Memory system

ABSTRACT

According to one embodiment, a controller is configured to write four-bit data in each of memory cells, and read first data item from the memory cells through application of a first voltage to a word line. The controller is configured to read second data items by repeating a first operation of reading data including data of respective first bits of the memory cells through application of two voltages to the word line at different timings while changing the two voltages in each first operation from the two voltages in another first operation. The controller is configured to mask part of each of the second data items using the first data.

CROSS-REFERENCE TO RELATED APPLICATIONS

This application is based upon and claims the benefit of priority fromJapanese Patent Application No. 2018-174175, filed Sep. 18, 2018; theentire contents of which are incorporated herein by reference.

FIELD

Embodiments described herein relate generally to a memory system.

BACKGROUND

A memory system including a semiconductor memory and a controller thatcontrols the semiconductor memory is known.

BRIEF DESCRIPTION OF THE VIEWS OF THE DRAWINGS

FIG. 1 shows components and connections in a memory system according toa first embodiment and associated components;

FIG. 2 shows an example of several components and connections in amemory cell array according to the first embodiment;

FIG. 3 shows the distribution of the threshold voltages of memory celltransistors each configured to store four-bit data according to thefirst embodiment;

FIG. 4 shows components and connections in a sense amplifier accordingto the first embodiment;

FIG. 5 is a flowchart showing an operation according to the firstembodiment;

FIG. 6 shows voltages applied to a selected word line along the timewhen a lower page is selected according to the first embodiment;

FIG. 7 shows voltages applied to a selected word line along the timewhen a middle page is selected according to the first embodiment;

FIG. 8 shows voltages applied to a selected word line along the timewhen an upper page is selected according to the first embodiment;

FIG. 9 shows voltages applied to a selected word line along the timewhen a top page is selected according to the first embodiment;

FIG. 10 is a sub-flowchart when a lower page is selected according tothe first embodiment;

FIG. 11 shows voltages applied to a selected word line along the timeduring shift read from a lower page according to the first embodiment;

FIG. 12 shows an example of various data obtained by reads according tothe first embodiment;

FIG. 13 shows an example of separation data obtained according to thefirst embodiment;

FIG. 14 shows an example of separation data obtained according to thefirst embodiment;

FIG. 15 shows an example of separation data obtained according to thefirst embodiment;

FIG. 16 shows an example of separation data obtained according to thefirst embodiment;

FIG. 17 shows processing according to the first embodiment;

FIG. 18 is a sub-flowchart when a middle page is selected according tothe first embodiment;

FIG. 19 shows voltages applied to a selected word along the time duringshift read from a middle page according to the first embodiment;

FIG. 20 is a sub-flowchart when an upper page is selected according tothe first embodiment;

FIG. 21 shows voltages applied to a selected word line along the timeduring shift read from an upper page according to the first embodiment;

FIG. 22 is a sub-flowchart when a top page is selected according to thefirst embodiment;

FIG. 23 shows voltages applied to a selected word line along the timeduring shift read from a top page according to the first embodiment;

FIG. 24 is a flowchart showing an operation according to the secondembodiment;

FIG. 25 is a flowchart showing an operation according to the secondembodiment;

FIG. 26 is a flowchart showing an operation according to the thirdembodiment;

FIG. 27 shows voltages applied to a selected word line along the timeduring an operation according to the third embodiment;

FIG. 28 is a flowchart showing an operation according to the fourthembodiment;

FIG. 29 shows an example of separation data obtained according to thefourth embodiment;

FIG. 30 is a sub-flowchart showing an operation of a memory systemaccording to the fourth embodiment;

FIG. 31 shows a relationship between differences in “1” data bit countand threshold voltages obtained according to the fourth embodiment;

FIG. 32 shows a concept of a method of determining a valley positionaccording to the fourth embodiment;

FIG. 33 shows a distribution of threshold voltages concerning twoadjacent states according to a fifth embodiment;

FIG. 34 shows a flowchart for an operation according to the fifthembodiment;

FIG. 35 shows data used in the fifth embodiment;

FIG. 36 shows search ranges for reference; and

FIG. 37 shows search ranges according to the fifth embodiment.

DETAILED DESCRIPTION

According to one embodiment, a memory system includes a semiconductormemory and a controller. The semiconductor memory includes memory cellsand a word line coupled to the memory cells. The controller isconfigured to write four-bit data in each of the memory cells, and readfirst data item from the memory cells through application of a firstvoltage to the word line. The controller is further configured to read aplurality of second data items by repeating a first operation of readingdata including data of respective first bits of the memory cells throughapplication of two voltages to the word line at different timings whilechanging the two voltages in each first operation from the two voltagesin another first operation. The controller is further configured to maskpart of each of the second data items using the first data.

Embodiments will now be described with reference to the figures. In thefollowing description, components with substantially the samefunctionalities and configurations will be referred to with the samereference numerals, and repeated descriptions may be omitted. The entiredescription for a particular embodiment also applies to anotherembodiment unless it is explicitly mentioned otherwise or obviouslyeliminated.

Each functional block can be implemented as hardware, computer software,or combination of the both. For this reason, in order to clearlyillustrate that each block can be any of hardware, software orcombination, descriptions will be made in terms of their functionalitiesin general. It is not necessary that functional blocks are distinguishedas in the following examples. For example, some of the functions may beimplemented by functional blocks different from those illustrated below.Furthermore, an illustrated functional block may be divided intofunctional sub-blocks.

Moreover, any step in a flow of a method of an embodiment is not limitedto any illustrated order, and can occur in an order different from anillustrated order and/or can occur concurrently with another step.

In the specification and the claims, a phrase of a particular firstcomponent being “coupled” to another second component includes the firstcomponent being coupled to the second component either directly or viaone or more components which are always or selectively conductive.

First Embodiment

<1.1. Structure (Configuration)>

FIG. 1 shows components and connections in a memory system according tothe first embodiment and associated components. As shown in FIG. 1, amemory system 5 is controlled by a host device 3 and includes asemiconductor memory 1 and a memory controller 2 which are. The memorysystem 5 can be, for example, an solid state drive (SSD) or SD™ card.

The memory controller 2 controls the semiconductor memory 1. The memorycontroller 2 receives instructions from the host device 3, and controlsthe semiconductor memory 1 based on the received instructions.

<1.1.1. Memory Controller>

The memory controller 2 includes a host interface 21, a centralprocessing unit (CPU) 22, a random access memory (RAM) 23, a read onlymemory (ROM) 24, a memory interface 25, and an error correction code(ECC) circuit 26. The memory controller 2 executes various operationsand some of the functions of the host interface 21 and the memoryinterface 25 by causing the CPU 22 to execute firmware (or, programs)stored in the ROM 24 and loaded in the RAM 23. The RAM 23 furthertemporarily stores data and functions as a buffer memory and a cashmemory.

The host interface 21 is connected to the host device 3 via a bus andcontrols communications between the memory controller 2 and the hostdevice 3. The memory interface 25 is connected to the semiconductormemory 1 and controls communications between the memory controller 2 andthe semiconductor memory 1.

The ECC circuit 26 performs processing required to detect and correcterrors in data written in the semiconductor memory 1 and data read fromthe semiconductor memory 1. More specifically, the ECC circuit 26generates redundant data for correcting an error in data to be writtenin the semiconductor memory 1 (or, substantial write data). Thegenerated redundant data and the substantial write data are then writtenin the semiconductor memory 1. The ECC circuit 26 detects an error indata read from the semiconductor memory 1, and tries to correct an errorif any.

<1.1.2. Semiconductor Memory>

The semiconductor memory 1 includes components such as a memory cellarray 11, an input and output circuit 12, a sequencer 13, a driver 15, asense amplifier 16, and a row decoder 19.

The memory cell array 11 includes memory blocks ELK such as BLK0, BLK1,. . . . Each block ELK is a set of string units SU such as SU0, SU1, . .. . Each string unit SU is a set of NAND strings STR such as STR0, STR1,. . . (not shown). The string STR includes memory cell transistors MT.

The input and output circuit 12 is connected to the memory controller 2via a NAND bus. The NAND bus transmits control signals and a signal DQhaving a width of eight bits. The control signals include signals ⁻CE,CLE, ALE, ⁻WE, ⁻RE, and ⁻WP and data strobe signals DQS and ⁻DQS. Thesymbol “⁻” indicates inverted logic. The input and output circuit 12receives and receives the signal DQ. The input and output circuit 12receives some control signals from the memory controller 2 and fetchesand outputs the signal DQ based on the received control signals. Thesignal DQ includes a command (CMD), write or read data (DAT), address(ADD), and status (STA).

The sequencer 13 receives the command CMD and the address ADD from theinput and output circuit 12, and controls driver 15, the sense amplifier16, and the row decoder 19 based on the received command CMD and theaddress ADD.

The driver 15 supplies a selected one of potentials to the row decoder19. The row decoder 19 receives various potentials from the driver 15and the address ADD from the input and output circuit 12, and transfersthe potential from the driver 15 to one block BLK selected based on thereceived address ADD.

The sense amplifier 16 senses a state of memory cell transistors MT,generates read data based on the sensed state, and transfers write datato the memory cell transistors MT.

<1.1.3. Memory Cell Array>

FIG. 2 shows an example of several components and connections in thememory cell array 11 according to the first embodiment, and showscomponents and connections in one block BLK0 and associated components.A plurality of blocks BLK, for example, all blocks BLK, each include thecomponents and the connections shown in FIG. 2.

One block BLK includes a plurality of (for example, four) string unitsSU0 to SU3.

In each block BLK, each of p (where p is a natural number) bit lines BL0to BL(p−1) is connected to one string STR from each of the string unitsSU0 to SU3.

Each string STR includes one select gate transistor ST, a plurality of,for example, eight memory cell transistors MT such as MT0 to MT7, andone select gate transistor DT such as DT0, DT1, DT2, or DT3. Thetransistors ST, MT, and DT are coupled in series in this order between asource line CELSRC and one bit line BL. A memory cell transistor MTincludes a control gate electrode (word line WL) and a charge storagelayer insulated from the surroundings, and can store data in anonvolatile manner based on the amount of charge in the charge storagelayer.

The strings STR respectively coupled to different bit lines BLconstitute one string unit SU. In each string unit SU, the control gateelectrodes of the memory cell transistors MT0 to MT7 are respectivelycoupled to word lines WL0 to WL7. In addition, in each block BLK, wordlines WL with the same address in different string units SU are coupledto each other. A set of memory cell transistors MT sharing a word lineWL in one string unit SU is referred to as a cell unit CU.

Transistors DT0 to DT3 respectively belong to the string units SU0 toSU3. In each case with α=0 to 3, the gates of respective transistors DTαof respective strings STR of a string unit SUα is coupled to a selectgate line SGDLα. The gates of the transistors ST are coupled to a selectgate line SGSL.

<1.1.4. Cell Transistors>

The memory cell transistors MT will be described with reference to FIG.3. The semiconductor memory 1 can store data of two bits or more in onememory cell transistor MT. FIG. 3 shows a distribution of the thresholdvoltages of the memory cell transistors MT each storing four-bit data asa result of data write in the memory system 5 according to the firstembodiment. The threshold voltage of each memory cell transistor MT hasa value corresponding to the stored data. When storing four-bit data permemory cell transistor MT, each memory cell transistor MT can have oneof 2⁴=16 threshold voltages. The 16 threshold voltages respectivelycorrespond to states of storing “1111” data, “1110” data, “1010” data,“1000” data, “1001” data, “0001” data, “0000” data, “0010” data, “0110”data, “0100” data, “1100” data, “1101” data, “0101” data, “0111” data,“0011” data, and “1011” data. The memory cell transistors MTrespectively storing “1111” data, “1110” data, “1010” data, “1000” data,“1001” data, “0001” data, “0000” data, “0010” data, “0110” data, “0100”data, “1100” data, “1101” data, “0101” data, “0111” data, “0011” data,and “1011” data are referred to as being in Er, A, B, C, D, E, F G, H,I, J, K, L, M, N, and O states. The memory cell transistors MT in Er, A,B, C, D, E, F G, H, I, J, K, L, M, N, and O states respectively havehigher threshold voltages in this order.

Even a plurality of memory cell transistors MT that store identicalfour-bit data can have different threshold voltages due to variations inthe characteristics of the memory cell transistors MT. Referring to FIG.3 and subsequent drawings, although the distribution of thresholdvoltages is indicated by a continuous curve, the numbers of memory celltransistors MT are discrete.

In order to determine the data stored in a memory cell transistor MT asa read target, the state of the memory cell transistor MT is determined.The state determination is performed by using read voltages VA, VB, VC,VD, VE, VF, VG, VH, VI, VJ, VK, VL, VM, VN, and VO. A voltage having amagnitude to be applied to the memory cell transistor MT as a readtarget to determine the state of the memory cell transistor MT,including read voltages VA, VB, VC, VD, VE, VF, VG, VH, VI, VJ, VK, VL,VM, VN, and VO may be referred as a read voltage VCGR hereinafter.

The read voltage VA is higher than the highest threshold voltage of thememory cell transistor MT in Er state, and is lower than the lowestthreshold voltage of the memory cell transistor MT in A stateimmediately after the write.

The read voltage VB is higher than the highest threshold voltage of thememory cell transistor MT in A state immediately after the write, and islower than the lowest threshold voltage of the memory cell transistor MTin B state immediately after the write.

The read voltage VC is higher than the highest threshold voltage of thememory cell transistor MT in B state immediately after the write, and islower than the lowest threshold voltage of the memory cell transistor MTin C state immediately after the write.

The read voltage VD is higher than the highest threshold voltage of thememory cell transistor MT in C state immediately after the write, and islower than the lowest threshold voltage of the memory cell transistor MTin D state immediately after the write.

The read voltage VE is higher than the highest threshold voltage of thememory cell transistor MT in D state immediately after the write, and islower than the lowest threshold voltage of the memory cell transistor MTin E state immediately after the write.

The read voltage VF is higher than the highest threshold voltage of thememory cell transistor MT in E state immediately after the write, and islower than the lowest threshold voltage of the memory cell transistor MTin F state immediately after the write.

The read voltage VG is higher than the highest threshold voltage of thememory cell transistor MT in F state immediately after the write, and islower than the lowest threshold voltage of the memory cell transistor MTin G state immediately after the write.

The read voltage VH is higher than the highest threshold voltage of thememory cell transistor MT in G state immediately after the write, and islower than the lowest threshold voltage of the memory cell transistor MTin H state immediately after the write.

The read voltage VI is higher than the highest threshold voltage of thememory cell transistor MT in H state immediately after the write, and islower than the lowest threshold voltage of the memory cell transistor MTin I state immediately after the write.

The read voltage VJ is higher than the highest threshold voltage of thememory cell transistor MT in I state immediately after the write, and islower than the lowest threshold voltage of the memory cell transistor MTin J state immediately after the write.

The read voltage VK is higher than the highest threshold voltage of thememory cell transistor MT in J state immediately after the write, and islower than the lowest threshold voltage of the memory cell transistor MTin K state immediately after the write.

The read voltage VL is higher than the highest threshold voltage of thememory cell transistor MT in K state immediately after the write, and islower than the lowest threshold voltage of the memory cell transistor MTin L state immediately after the write.

The read voltage VM is higher than the highest threshold voltage of thememory cell transistor MT in L state immediately after the write, and islower than the lowest threshold voltage of the memory cell transistor MTin M state immediately after the write.

The read voltage VN is higher than the highest threshold voltage of thememory cell transistor MT in M state immediately after the write, and islower than the lowest threshold voltage of the memory cell transistor MTin N state immediately after the write.

The read voltage VO is higher than the highest threshold voltage of thememory cell transistor MT in N state immediately after the write, and islower than the lowest threshold voltage of the memory cell transistor MTin O state immediately after the write.

The read voltages VA, VB, VC, VD, VE, VF, VG, VH, VI, VJ, VK, VL, VM,VN, and VO are, for example, default voltages. Read using the readvoltage VX (where X is A, B, C, D, E, F, G, H, I, J, K, L, M, N, or O)is referred to as X read (XR).

A state of the memory cell transistor MT as a read target (selectedmemory cell transistor) is determined by determining in which range thethreshold voltage of the memory cell transistor MT falls. In order todetermine a range in which the threshold voltage of the selected memorycell transistor MT falls, it is determined whether the threshold voltageexceeds a read voltage VCGR. The memory cell transistor MT having athreshold voltage equal to or higher than the read voltage VCGRmaintains an OFF state even while receiving the read voltage VCGR at itscontrol gate electrode. In contrast to this, the memory cell transistorMT having a threshold voltage lower than the read voltage VCGR is turnedon while receiving the read voltage VCGR at its control gate electrode.A voltage VREAD is applied to the word line WL of memory celltransistors MT of cell units CU as a non-read target, and is higher thanthe threshold voltages of the memory cell transistors MT in any states.

A set of data of bits at the same position (digit) of the memory celltransistors MT of one cell unit CU constitutes one page. A set of dataof bits at the most significant (first digit) position of the memorycell transistors MT of each cell unit CU is referred to as a top page. Aset of data of bits at the second digit from the most significant digitof the memory cell transistors MT of each cell unit CU is referred to asan upper page. A set of data of bits at the third digit from the mostsignificant digit of the memory cell transistors MT of each cell unit CUis referred to as a middle page. A set of data of bits at the leastsignificant (fourth digit) position of the memory cell transistors MT ofeach cell unit CU is referred to as a lower page.

The data of each page is determined by read using a plurality of readvoltages VCGR with different magnitudes. The following is an example.Data obtained by X read is referred to as X read data XD.

Each bit of a lower page is determined as “1” data when it is determinedthat the threshold voltage of the selected memory cell transistor MTstoring the data of that bit falls within the range of lower than theread voltage VA, the range of the read voltage VD or higher and lowerthan the read voltage VF, or the range of the read voltage VK or higher.Each bit of a lower page is determined as “0” data when it is determinedthat the threshold voltage of the selected memory cell transistor MTstoring the data of the bit falls within the range of the read voltageVA or higher and lower than the read voltage VD, or the range of theread voltage VF or higher and lower than the read voltage VK. In orderto determine the state of the selected memory cell transistor MT, theread voltage VCGR at the boundary between a state determined as “0” dataand a state determined as “1” data is used. Lower page read uses, forexample, A read, D read, F read, and K read. The state of the selectedmemory cell transistor MT can be determined by the logical operation ofA read data AD, D read data DD, F read data FD, and K read data KD.

The same applies to other pages. Middle page data is determined byusing, for example, C read, G read, I read, and M read. Upper page datais determined by using, for example, B read, H read, and N read. Toppage data is determined by using, for example, E read, J read, L read,and O read.

A plurality of reads required to identify the data stored in a page,such as a set of A read, D read, F read, and K read in the case of lowpage read, are referred to as boundary reads required for the page.

The threshold voltage of the memory cell transistor MT can change due tofactors such as disturbances from immediately after the write and/or alapse of time. The threshold voltage of a memory cell transistor MT canbe erroneously determined as being in a state different from a stateintended at the time of write depending on how the threshold voltagechanges.

<1.1.5. Sense Amplifier>

FIG. 4 shows components and connections in the sense amplifier 16according to the first embodiment. The sense amplifier 16 includes psense amplification circuits SAC, data latches DL, such as DL0, DL1,DL2, . . . , DLq (where q is a natural number), p arithmetic circuitsLC, and one data latch XDL. In each case in which β is between 0 and q,a data latch DLβ includes p data latch circuits DLβC. The data latch XDLincludes p data latch circuits XDLC. The data latch circuits DLβC andXDLC temporarily store data.

Each bit line BL is coupled to one sense amplification circuits SAC, q+1data latch circuits DL0C, DL1C, DL2C, . . . , DLqC, one arithmeticcircuit LC, and one data latch circuit XDLC.

Each sense amplification circuit SAC is electrically coupled to oneselected memory cell transistor MT via one bit line BL coupled to thesense amplification circuit SAC during data read. Each senseamplification circuit SAC senses a voltage of a magnitude determinedbased on the threshold voltage of the selected memory cell transistor MTon a node in the sense amplification circuit SAC, and determines, basedon the sense result, to which one of two states the memory celltransistor MT electrically coupled to the sense amplification circuitSAC belongs. The two states of the memory cell transistor MT arerespectively expressed by “0” data and “1” data. Each senseamplification circuit SAC stores information indicating that read datais “0” data or “1” data in a data latch circuit DLC coupled to the senseamplification circuit SAC.

The arithmetic circuit LC can perform a logical operation for data inthe data latch circuits DLC and XDLC coupled to the arithmetic circuitLC. Logical operations include a NOT operation, a logical OR operation,a logical AND operation, an exclusive XOR operation, and an exclusiveNOR operation.

<1.2. Operation>

FIG. 5 shows a flowchart for an operation of the memory system accordingto the first embodiment. FIG. 5, in particular, shows a flowchartconcerning data read from a page in a cell unit CU of a string unit SUof a block BLK. Some of the steps will be described in detail later.

As shown in FIG. 5, in step S1, the memory controller 2 instructs thesemiconductor memory 1 to perform read from a page in a cell unit CU.,the memory controller 2 transmits a command set for read to thesemiconductor memory 1. The read command set specifies the cell unit CUas a read target and a page as a read target. A read target cell unit CUand a read target page are respectively referred to as a selected cellunit CU and a selected page. In addition, the string unit SU includingthe selected cell unit CU is referred to as a selected string unit SU,and the block BLK including the selected string unit SU is referred toas a selected block BLK.

In step S2, upon receiving the read command set, the semiconductormemory 1 reads data from the selected page, and transmits the read datato the memory controller 2.

In step S3, the memory controller 2 receives the read data, and controlsthe ECC circuit 26 to try to correct an error in the received read data.

If no error is included or error correction has succeeded (YES branch ofstep S4), the data written in the selected page is obtained. Writtendata, i.e., data including no error or having undergone errorcorrection, will be referred to as errorless data hereinafter. Whenerrorless data is obtained, the flowchart in FIG. 5 comes to an end.

When the error correction fails in step S4 (NO branch of step S4), theprocess goes to step S5. In step S5, the memory controller 2 determines,by estimation, the read voltage VCGR to be used next. The read voltageVCGR is estimated with an expectation to acquire errorless data from thedata read from the selected page by using the read voltage VCGR. Thedetails of step S5 will be described later. For a case of storingfour-bit data per memory cell transistor MT, in order to read data fromone page, three or four read voltages (boundary read voltages) VCGR forthree or four boundary reads are required. For this reason, step S5includes estimating three or four boundary read voltages VCGR.

In step S6, the memory controller 2 instructs the semiconductor memory 1to perform shift read using the read voltages VCGR estimated in step S5.Shift read is read using a read voltages VCGR differing in magnitudefrom a standard (for example, default) read voltage VCGR whilespecifying an adjustment for the standard read voltage VCGR. The readvoltages VCGR used for shift read are referred to as shift read voltagesVCGRS. In order to perform shift read, the memory controller 2 transmitsa command set for shift read to the semiconductor memory 1. A shift readcommand set specifies the selected cell unit CU, a selected page, anddifferences ΔV between the standard read voltages VCGR and the shiftread voltages VCGRS. In storing four-bit data per memory cell transistorMT, a shift read command set specifies three or four differences ΔV forthree or four boundary read voltages.

In step S7, upon receiving the shift read command set, the semiconductormemory 1 reads data from the selected page by using the shift readvoltages VCGRS, i.e., performs shift read with respect to the selectedpage, and transmits the read data to the memory controller 2. The readdata obtained by shift read is referred to as shift read data.

In step S8, the memory controller 2 receives shift read data andcontrols the ECC circuit 26 to try to correct an error in the receiveddata. When shift read data including no error (errorless shift readdata) is obtained (YES branch of step S8), the flowchart in FIG. 5 comesto an end. When error correction fails (NO branch of step S8), theprocess goes to step S9.

In step S9, the memory controller 2 tries to correct an error in thedata from the selected page by using another method. Upon completion ofstep S9, the flowchart in FIG. 5 comes to an end.

<1.2.1. Details of Step S2 (Read)>

The read in step S2 varies depending on whether a lower page, middlepage, upper page, or top page is selected. Each of four cases will bedescribed below.

<1.2.1.1. Details of Read from Lower Page>

FIG. 6 shows voltages applied to the word line (selected word line) WLcoupled to the selected cell unit CU in step S2 along the time when alower page is selected according to the first embodiment.

In the period shown in FIG. 6, the voltages required to perform readfrom a selected page of the selected cell unit CU are applied toassociated components. For example, a voltage VSG is applied to a selectgate line SGDL coupled to the selected string unit SU of the selectedblock BLK over the period from time t101 to time t105. The voltage VSGhas a magnitude that turns on the selected gate transistor DT. Inaddition, the voltage VREAD is applied to unselected word lines WL amongthe word lines WL over the period from time t101 to time t105. With theapplication of such voltages, the strings STR of the selected stringunit SU are electrically coupled between respective bit lines BL and thecell source line CELSRC.

As shown in FIG. 6, a read voltage VA0 is applied to the selected wordline WL over the period from time t101 to time t102. Read voltages VAw,with w (where w is 0 or a natural number) representing different values,have different magnitudes. The read voltage VAw may have the samemagnitude as that of a read voltage VA, or a magnitude different fromthat of the read voltage VA. For example, when the read voltage VA as adefault voltage is used for read in step S2, the magnitude of the readvoltage VA0 is the same as that of the read voltage VA.

As a result of application of the read voltage VA0, when a selectedmemory cell transistor MT is turned on, a current flows from thecorresponding bit line BL to the source line CELSRC, and when it remainsoff, no such a current flows. The sense amplifier 16 determines whetherthis current flows. Based on this determination, it is determinedwhether the threshold voltage of the selected memory cell transistor MTis lower than the read voltage VA0, or equal to or higher than the readvoltage VA0.

Read using a read voltage VXw is referred to as Xw read. The dataobtained by A0 read is stored in a first data latch DL of the datalatches DL0 to DLq. “0” data is obtained from the selected memory celltransistor MT having a threshold voltage equal to or higher than theread voltage VA0, and “1” data is obtained from the memory celltransistor MT having a threshold voltage lower than the read voltageVA0. The data obtained from each selected memory cell transistor MT isstored in the data latch circuit DLC coupled to the bit line BL coupledto the memory cell transistor MT in the first data latch DL.

A read voltage VD0 is applied to the selected word line WL over theperiod from time t102 to time t103 to perform D0 read and obtain D0 readdata. A read voltage VF0 is applied to the selected word line WL overthe period from time t103 to time t104 to perform F0 read and obtain F0read data. A read voltage VK0 is applied to the selected word line WLover the period from time t104 to time t105 to perform K0 read andobtain K0 read data. The A0 read data, the D0 read data, the F0 readdata, and the K0 read data are respectively stored in the different onesof the data latches DL0 to DLq.

Subsequently, the data of the lower page of the selected cell unit CU isobtained based on the A0 read data, the D0 read data, the F0 read data,and the K0 read data. The data read from the lower page by using theread voltages VAw, VDw, VFw, and VKw is referred to as lower page readdata LDw.

<1.2.1.2. Details of Read from Middle Page>

FIG. 7 shows voltages applied to the selected word line WL along thetime in step S2 when a middle page is selected according to the firstembodiment.

In the period shown in FIG. 7, the voltages required to perform readfrom a selected page of the selected cell unit CU are applied toassociated components as described with reference to FIG. 6.

As shown in FIG. 7, a read voltage VC0 is applied to the selected wordline WL over the period from time t201 to time t202 to perform C0 readand obtain C0 read data. A read voltage VG0 is applied to the selectedword line WL over the period from time t202 to time t203 to perform G0read and obtain G0 read data. A read voltage VI0 is applied to theselected word line WL over the period from time t203 to time t204 toperform I0 read and obtain I0 read data. A read voltage VM0 is appliedto the selected word line WL over the period from time t204 to time t205to perform M0 read and obtain M0 read data.

Subsequently, the data of the middle page of the selected cell unit CUis obtained based on the C0 read data, the G0 read data, the IO readdata, and the M0 read data. The data read from the middle page by usingread voltages VCw, VGw, VIw, and VMw is referred to as middle page readdata MDw.

<1.2.1.3. Details of Read From Upper Page>

FIG. 8 shows voltages applied to the selected word line WL along thetime in step S2 when an upper page is selected according to the firstembodiment.

In the period shown in FIG. 8, the voltages required to perform readfrom a selected page of the selected cell unit CU are applied toassociated components as described with reference to FIG. 6.

As shown in FIG. 8, a read voltage VB0 is applied to the selected wordline WL over the period from time t301 to time t302 to perform B0 readand obtain B0 read data. A read voltage VH0 is applied to the selectedword line WL over the period from time t302 to time t303 to perform H0read and obtain H0 read data. A read voltage VN0 is applied to theselected word line WL over the period from time t303 to time t304 toperform N0 read and obtain N0 read data.

Subsequently, the data of the upper page of the selected cell unit. CUis obtained based on the B0 read data, the H0 read data, and the N0 readdata. The data read from the upper page by using read voltages VBw, VHw,and VNw is referred to as upper page read data UDw.

<1.2.1.4. Details of Read from Top Page>

FIG. 9 shows voltages applied to the selected word line WL along thetime in step S2 when a top page is selected according to the firstembodiment.

In the period shown in FIG. 9, the voltages required to perform readfrom a selected page of the selected cell unit CU are applied toassociated components as described with reference to FIG. 6.

As shown in FIG. 9, a read voltage VE0 is applied to the selected wordline WL over the period from time t401 to time t402 to perform E0 readand obtain B0 read data. A read voltage VJ0 is applied to the selectedword line WL over the period from time t402 to time t403 to perform J0read and obtain J0 read data. A read voltage VL0 is applied to theselected word line WL over the period from time t403 to time t404 toperform L0 read and obtain L0 read data. A read voltage VO0 is appliedto the selected word line WL over the period from time t404 to time t405to perform O0 read and obtain O0 read data.

Subsequently, the data of the top page of the selected cell unit CU isobtained based on the E0 read data, the J0 read data, the LO read data,and the O0 read data. The data read from the top page by using readvoltages VE0, VJ0, VL0, and VO0 is referred to as top page read dataTD0.

<1.2.2. Details of Step S5 (Read Voltage Estimation)>

The read voltage estimation in step S5 differs depending on which one ofa lower page, a middle page, an upper page, and a top page is selected.Each of the four cases will be described below.

<1.2.2.1. When Selected Page is Lower Page>

FIG. 10 is a sub-flowchart for step S5 when a lower page is selectedaccording to the first embodiment. As shown in FIG. 10, the NO branch ofstep S4 goes to step S5101.

The memory controller 2 performs single state read several times on theselected page through several steps from step S5101. Single state readindicates the operation of obtaining X read data XD from thesemiconductor memory 1 unlike data read from a page.

In step S5101, the memory controller 2 instructs B read on the selectedcell unit CU. To this end, the memory controller 2 transmits, to thesemiconductor memory 1, a command to instruct B read on the selectedcell unit CU.

In step S5102, upon receiving the B read command, the semiconductormemory 1 performs B read on the selected cell unit CU to obtain B readdata BD, and transmits the B read data BD to the memory controller 2.The memory controller 2 stores the B read data BD in the RAM 23.

In step S5103, the memory controller 2 transmits, to the semiconductormemory 1, a command to instruct E read on the selected cell unit CU.

In step S5104, upon receiving the E read command, the semiconductormemory 1 performs E read on the selected cell unit CU to obtain E readdata ED, and transmits the E read data ED to the memory controller 2.The memory controller 2 stores the E read data ED in the RAM 23.

In step S5105, the memory controller 2 transmits, to the semiconductormemory 1, a command to instruct H read on the selected cell unit CU.

In step S5106, upon receiving the H read command, the semiconductormemory 1 performs H read on the selected cell unit CU to obtain H readdata HD, and transmits the H read data HD to the memory controller 2.The memory controller 2 stores the H read data HD in the RAM 23.

Step S5106 continues at step S5111. The memory controller 2 performsshift read Z (where Z is a natural number) times from step S5111 to stepS5115. For example, Z is 5. The following description is based on thisexample. In each shift read, the memory controller 2 specifies shiftamounts ΔVA, ΔVD, ΔVF, and ΔVK. Shift amounts ΔVA, ΔVD, ΔVF, and ΔVK ineach shift read are different from shift amounts ΔVA, ΔVD, ΔVF, and ΔVKin another shift read. The following is an example of executing eachshift read with the shift amounts ΔVA, ΔVD, ΔVF, and ΔVK which aredifferent from those in another shift read.

In step S5111, the memory controller 2 sets a parameter z (where z is anatural number equal to or lower than Z) to 1.

In step S5112, the memory controller 2 instructs lower page read (lowerpage shift read) LSRz using shift read voltages in the zth loop on theselected cell unit CU. For the lower page shift read LSRz, the memorycontroller 2 transmits a shift read command set to the semiconductormemory 1. The shift read command set specifies a selected page and shiftamounts ΔVAz, ΔVDz, ΔVFz, and ΔVKz. The shift amounts ΔVAz, ΔVDz, ΔVFz,and ΔVKz are respectively added to standard read voltages VA, VD, VF,and VK in lower page shift read LSRz.

In step S5113, the semiconductor memory 1 performs lower page shift readLSRz on the selected cell unit CU with the shift amounts ΔVAz, ΔVDz,ΔVFz, and ΔVKz. That is, the semiconductor memory 1 performs lower pageread with shift read voltages VAz, VDz, VFz, and VKz instead of the readvoltages VA, VD, VF, and VK. The shift read voltage VAz is VA+ΔVAz. Theshift read voltage VDz is VD+ΔVDz. The shift read voltage VFz isVF+ΔVFz. The shift read voltage VKz is VK+ΔVKz. The data obtained bylower page shift read LSRz is referred to as lower page shift read dataLSDz. The semiconductor memory 1 transmits the lower page shift readdata LSDz to the memory controller 2.

In step S5114, the memory controller 2 determines whether z is Z. Whenz≠Z (NO branch of step S5114), the memory controller 2 sets z=z+1 instep S5115. The process returns to step S5112. When z=Z (YES branch ofstep S5114), the process goes to step S5121. When the process goes tostep S5121, the memory controller 2 should store lower page shift readdata LSD1, LSD2, LSD3, LSD4, and LSD5.

In step S5121, the memory controller 2 masks particular bits of thelower page shift read data LSD1 to SLD5 with the B read data BD, the Eread data ED, and the H read data HD. To this end, the memory controller2 performs logical operations using the B read data BD, the E read dataED, the H read data HD, and the lower page shift read data LSD1 to LSD5.Performing the logical operations will produce separation data ADs suchas ADs1, ADs2, ADs3, ADs4, and ADs5, separation data DDs such as DDs1,DDs2, DDs3, DDs4, and DDs5, separation data FDs such as FDs1, FDs2,FDs3, FDs4, and FDs5, and separation data KDs such as KDs1, KDs2, KDs3,KDs4, and KDs5. Separation data ADsz, DDsz, FDsz, and KDsz each areformed from part of the lower page shift read data LSDz. A method ofobtaining the separation data ADs, DDs, FDs, and KDs will be describedlater. The memory controller 2 stores the obtained separation data ADs,DDs, FDs, and KDs in the RAM 23.

In step S5122, the memory controller 2 calculates bit counts BCA1, BCA2,BCA3, BCA4, BCA5, BCD1, BCD2, BCD3, BCD4, BCD5, BCF1, BCF2, BCF3, BCF4,BCF5, BCK1, BCK2, BCK3, BCF4, and BCK5 with the separation data ADs,DDs, FDs, and KDs. The method for the calculation will be describedlater.

In step S5123, the memory controller 2 determines boundary read voltagesVAS, VDS, VFS, and VKS with the bit counts BCA1, BCA2, BCA3, BCA4, BCA5,BCD1, BCD2, BCD3, BCD4, BCD5, BCF1, BCF2, BCF3, BCF4, BCF5, BCK1, BCK2,BCK3, BCF4, and BCK5. The method for the determination will be describedlater.

The memory controller 2 then calculates shift amounts ΔVAS, ΔVDS, ΔVFS,and ΔVKS. The shift amount ΔVAS is VAS−VA. The shift amount ΔVDS isVDS−VD. The shift amount ΔVFS is VFS−VF. The shift amount ΔVKS isVKS−VK.

Step S5123 continues at step S6. When step S6 follows step S5123, thememory controller 2 specifies the shift amounts ΔVAS, ΔVDS, ΔVFS, andΔVKS in step S6. In step S6, the shifted boundary read voltages VAS,VDS, VFS, and VKS are used. A boundary read voltage VXS that is shiftedis referred to as shifted boundary read voltage VXS.

The set of steps S5101 and S5102, the set of steps S5103 and S5104, andthe set of steps S5105 and S5106 can be performed in any orderdifferently from the order described with reference to FIG. 10.

The set of steps S5111, S5112, S5113, S5114, and S5115 may be performedbefore the set of steps S5101, S5102, S5103, S5104, S5105, and S5106. Inthis case, the NO branch of step S4 continues at step S5111, YES branchof step S5114 continues at step S5101, and step S5106 continues at stepS5121.

<1.2.2.1.1. Shift Read>

FIG. 11 shows voltages applied to the selected word line WL along thetime in step S5113 according to the first embodiment.

As described with reference to FIG. 6, while the voltage is applied tothe selected word line WL, for example, the voltage VSG is applied tothe select gate line SGDL coupled to the selected string unit SU of theselected block BLK, and the voltage VREAD is applied to the unselectedword lines WL.

As shown in FIG. 11, voltage application for lower page shift read LSR1is performed in the period from time till to time t115, and voltageapplication for lower page shift read LSR2 is performed in thesubsequent period from time t121 to time t125. Subsequently, voltageapplication for lower page shift read LSR3 is performed in the periodfrom time t131 to time t135 (not shown), and voltage application forlower page shift read LSR4 is performed in the period from time t141 totime t145 (not shown). Voltage application for lower page shift readLSR5 is then performed in the period from time t151 to time t155.

In the example in FIG. 11, in each of cases in which z=1, 2, and 3, theshift amounts ΔVAz, ΔVDz, ΔVF, and ΔVK have negative magnitudes.

In each of cases in which γ is natural numbers from 1 to 5, a readvoltage VAγ is applied to the selected word line WL over the period fromtime t1γ1 to time t1γ2 to perform Aγ read. A read voltage VDγ is appliedto the selected word line WL over the period from time t1γ2 to time t1γ3to perform Dγ read. A read voltage VFγ is applied to the selected wordline WL over the period from time t1γ3 to time t1γ4 to perform Fγ read.A read voltage VKγ is applied to the selected word line WL over theperiod from time t1γ4 to time t1γ5 to perform Kγ read.

<1.2.2.1.2. Data Read from Semiconductor Memory>

FIG. 12 shows an example of data obtained by steps S5102, S5104, S5106,and S5113. Each square in FIG. 12 indicates 1-bit data read from aselected memory cell transistor MT having a threshold voltage in therange corresponding to the square.

As shown in FIG. 12, the B read data BD has “1” data in each bit readfrom a memory cell transistor MT having a threshold voltage lower thanthe read voltage VB, and has “0” data in each bit read from a memorycell transistor MT having a threshold voltage equal to or higher thanthe read voltage VB.

The E read data ED has “1” data in each bit read from a memory celltransistor MT having a threshold voltage lower than the read voltage VE,and has “0” data in each bit read from a memory cell transistor MThaving a threshold voltage equal to or higher than the read voltage VE.

The H read data HD has “1” data in each bit read from a memory celltransistor MT having a threshold voltage lower than the read voltage VH,and has “0” data in each bit read from a memory cell transistor MThaving a threshold voltage equal to or higher than the read voltage VH.

The lower page shift read LSR1 uses read voltages VA1, VD1, VF1, and VK1different from the read voltages VA, VD, VF, and VK. In performing readfrom a memory cell transistor MT having a threshold voltage, whendifferent read voltages are used, bits obtained by the read can havedifferent values. For this reason, the boundary (to be referred to asthe boundary voltage hereinafter) between the threshold voltage of thememory cell transistor MT that reads out “1” data and the thresholdvoltage of the memory cell transistor MT that reads out “0” data in thelower page shift read data LSD1 is different from the boundary voltagein lower page read data LD0. More specifically, the boundary voltage inthe lower page shift read data LSD1 is lower than that in the lower pageread data LD0.

Likewise, the boundary voltages in the lower page shift read data LSD2,LSD3, LSD4, and LSD5 are different from those in the lower page shiftread data LSD1. For example, the lower page shift read data LSD1, LSD2,LSD3, LSD4, and LSD5 have higher threshold voltages in the order named.

<1.2.2.1.3. Separation Data Operation>

FIGS. 13, 14, 15, and 16 each show an example of data obtained by stepS5121 according to the first embodiment. FIGS. 13, 14, 15, and 16respectively show examples of the separation data ADs, DDs, FDs, andKDs.

The memory controller 2 performs, for example, the following logicaloperations in the RAM 23 to generate the separation data ADs, DDs, FDs,and KDs.

<1.2.2.1.3.1. Separation Data ADs Calculation>

The separation data ADs can be obtained by equation (1).ADs=LSD & BD  (1)

The operator “&” indicates an AND operation on two operands on bothsides. In each of cases in which γ is natural numbers from 1 to 5, thememory controller 2 obtains separation data ADsγ by calculatingADsy=LSDγ & BD.

As shown in FIG. 13, the separation data ADs1, ADs2, ADs3, ADs4, andADs5 respectively have different numbers of “1” data bits. When thenumbers of “1” data bits differ, the numbers of “0” data bits alsodiffer. In particular, the separation data ADs1, ADs2, ADs3, ADs4, andADs5 differ in the number of “1” data bits read from the memory celltransistors MT having threshold voltages between the read voltage VA1and the read voltage VAS. The separation data ADs1, ADs2, ADs3, ADs4,and ADs5 in each of the remaining bits have the same value.

The separation data ADs1 has no “1” data in bits read from memory celltransistors MT having threshold voltages between the read voltage VA1and the read voltage VA5.

The separation data ADs2 has “1” data in a bit read from a memory celltransistor MT having a threshold voltage between the read voltage VA1and the read voltage VA2.

The separation data ADs3 has “1” data in a bit read from a memory celltransistor MT having a threshold voltage between the read voltage VA1and the read voltage VA3.

The separation data ADs4 has “1” data in a bit read from a memory celltransistor MT having a threshold voltage between the read voltage VA1and the read voltage VA4.

The separation data ADs5 has “1” data in a bit read from a memory celltransistor MT having a threshold voltage between the read voltage VA1and the read voltage VA5.

The number of “1” data bits in the bits read from the memory celltransistors MT having threshold voltages between the read voltage VA1and the read voltage VA5 increases in the order of the separation dataADs1, ADs2, ADs3, ADs4, and ADs5. This makes it possible to use theseparation data ADs1 to ADs5 to estimate the number of memory celltransistors MT having threshold voltages with the same magnitudes asthose of the read voltages VA2 to VA5 in the selected cell unit CU.

<1.2.2.1.3.2. Separation Data DDs Calculation>

The separation data DDs can be obtained by equation (2).DDs=(LSD & ⁻ BD) & ED  (2)

The memory controller 2 obtains separation data DDsγ by calculatingDDsγ=(LSDγ & ⁻BD) & ED in each of cases in which γ is natural numbersfrom 1 to 5.

As shown in FIG. 14, the separation data DDs1, DDs2, DDs3, DDs4, andDDs5 respectively have different numbers of “1” data bits. Inparticular, the separation data DDs1, DDs2, DDs3, DDs4, and DDs5 differin the number of “0” data bits read from the memory cell transistors MThaving threshold voltages between the read voltage VD1 and the readvoltage VD5. The separation data DDs1, DDs2, DDs3, DDs4, and DDs5 ineach of the remaining bits have the same value.

The separation data DDs1 has no “0” data in bits read from memory celltransistors MT having threshold voltages between the read voltage VD1and the read voltage VD5.

The separation data DDs2 has “0” data in a bit read from a memory celltransistor MT having a threshold voltage between the read voltage VD1and the read voltage VD2.

The separation data DDs3 has “0” data in a bit read from a memory celltransistor MT having a threshold voltage between the read voltage VD1and the read voltage VD3.

The separation data DDs4 has “0” data in a bit read from a memory celltransistor MT having a threshold voltage between the read voltage VD1and the read voltage VD4.

The separation data DDs5 has “0” data in a bit read from a memory celltransistor MT having a threshold voltage between the read voltage VD1and the read voltage VD5.

The number of “0” data bits in the bits read from the memory celltransistors MT having threshold voltages between the read voltage VD1and the read voltage VD5 increases in the order of the separation dataDDs1, DDs2, DDs3, DDs4, and DDs5. This makes it possible to use theseparation data DDs1 to DDs5 to estimate the number of memory celltransistors MT having threshold voltages with the same magnitudes asthose of the read voltages VD2 to VD5 in the selected cell unit CU.

<1.2.2.1.3.3. Separation Data FDs Calculation>

The separation data FDs can be obtained by equation (3).FDs=(LSD & ⁻ ED) & HD  (3)

The memory controller 2 obtains separation data FDsγ by calculatingFDsγ=(LSDγ & ⁻ED) & HD in each of cases in which γ is natural numbersfrom 1 to 5.

As shown in FIG. 15, the separation data FDs1, FDs2, FDs3, FDs4, andFDs5 respectively have different numbers of “1” data bits. Inparticular, the separation data FDs1, FDs2, FDs3, FDs4, and FDs5 differin the number of “1” data bits read from the memory cell transistors MThaving threshold voltages between the read voltage VF1 and the readvoltage VF5. The separation data FDs1, FDs2, FDs3, FDs4, and FDs5 ineach of the remaining bits have the same value.

The separation data FDs1 has no “1” data in bits read from memory celltransistors MT having threshold voltages between the read voltage VF1and the read voltage VF5.

The separation data FDs2 has “1” data in a bit read from a memory celltransistor MT having a threshold voltage between the read voltage VF1and the read voltage VF2.

The separation data FDs3 has “1” data in a bit read from a memory celltransistor MT having a threshold voltage between the read voltage VF1and the read voltage VF3.

The separation data FDs4 has “1” data in a bit read from a memory celltransistor MT having a threshold voltage between the read voltage VF1and the read voltage VF4.

The separation data FDs5 has “1” data in a bit read from a memory celltransistor MT having a threshold voltage between the read voltage VF1and the read voltage VF5.

The number of “1” data bits in the bits read from the memory celltransistors MT having threshold voltages between the read voltage VF1and the read voltage VF5 increases in the order of the separation dataFDs1, FDs2, FDs3, FDs4, and FDs5. This makes it possible to use theseparation data FDs1 to FDs5 to estimate the number of memory celltransistors MT having threshold voltages with the same magnitudes asthose of the read voltages VF2 to VF5 in the selected cell unit CU.

<1.2.2.1.3.4. Separation Data KDs Calculation>

The separation data KDs can be obtained by equation (4).KDs=LSD & ⁻ HD  (4)

The memory controller 2 obtains separation data KDsγ by calculatingKDsγ=LSDγ & ⁻HD in each of cases in which γ is natural numbers from 1 to5.

As shown in FIG. 16, the separation data KDs1, KDs2, KDs3, KDs4, andKDs5 respectively have different numbers of “0” data bits. Inparticular, the separation data KDs1, KDs2, KDs3, KDs4, and KDs5 differin the number of “0” data bits read from the memory cell transistors MThaving threshold voltages between the read voltage VK1 and the readvoltage VKS. The separation data KDs1, KDs2, KDs3, KDs4, and KDs5 ineach of the remaining bits have the same value.

The separation data KDs1 has no “0” data in bits read from memory celltransistors MT having threshold voltages between the read voltage VK1and the read voltage VK5.

The separation data KDs2 has “0” data in a bit read from a memory celltransistor MT having a threshold voltage between the read voltage VK1and the read voltage VK2.

The separation data KDs3 has “0” data in a bit read from a memory celltransistor MT having a threshold voltage between the read voltage VK1and the read voltage VK3.

The separation data KDs4 has “0” data in a bit read from a memory celltransistor MT having a threshold voltage between the read voltage VK1and the read voltage VK4.

The separation data KDs5 has “0” data in a bit read from a memory celltransistor MT having a threshold voltage between the read voltage VK1and the read voltage VKS.

The number of “0” data bits in the bits read from the memory celltransistors MT having threshold voltages between the read voltage VK1and the read voltage VKS increases in the order of the separation dataKDs1, KDs2, KDs3, KDs4, and KDs5. This makes it possible to use theseparation data KDs1 to KDs5 to estimate the number of memory celltransistors MT having threshold voltages with the same magnitudes asthose of the read voltages VK2 to VK5 in the selected cell unit CU.

<1.2.2.1. Four-Bit Count and Shifted Boundary Read Voltage Estimation>

FIG. 17 is a view for describing processing in steps S5122 and S5123according to the first embodiment. FIG. 17 shows the processing forestimating shifted boundary read voltages VAS in steps S5122 and S5123.

Part (a) shows a range including a boundary between the distribution ofthe threshold voltages of the memory cell transistors MT which arewritten as Er state and the distribution of the threshold voltages ofthe memory cell transistors MT which are written as A state. Note,however, that the memory controller 2 does not know a distribution shownin part (a).

The memory controller 2 counts “0” data bits or “1” data bits in each ofthe separation data ADs1 to ADs5. The memory controller 2 can count, forexample, the number of “0” data bits or the number of “1” data bitswhich increases in ascending order of the separation data ADs1 to ADs5.When counting in the separation data ADs1 to ADs5, the memory controller2 can count “1” data in each of the separation data ADs1 to ADs5.

Part (b) shows an example of the counts. The bit count BCA1 is thenumber of “1” data bits in the separation data based on VA1 read data,i.e., the separation ADs1. The bit count BCA2 is the number of “1” databits in the separation data ADs2. The bit count BCA3 is the number of“1” data bits in the separation data ADs3. The bit count BCA4 is thenumber of “1” data bits in the separation data ADs4. The bit count BCA5is the number of “1” data bits in the separation data ADs5.

The memory controller 2 then calculates the differences between specificpairs of the bit counts BCA1, BCA2, BCA3, BCA4, and BCA5. Morespecifically, the memory controller 2 calculates BCA2−BCA1, BCA3−BCA2,BCA4−BCA3, and BCA5−BCA4. Part (c) shows an example of the calculationresult.

Each difference represents the number of memory cell transistors MT thatare turned on first at corresponding threshold voltages. For example,BCA2−BCA1 represents the number of memory cell transistors MT that arenot turned on at the read voltage VA1 but turned on at the read voltageVA2. Based on this, the memory controller 2 regards each difference asthe number of corresponding memory cell transistors MT. For example,BCA2−BCA1 is regarded as the number of memory cell transistors MT havinga threshold voltage with the same magnitude as that of the read voltageVA2. The relationships between such differences and threshold voltagesequivalently represent the numbers of memory cell transistors MTrespectively having threshold voltages with the same magnitudes as thoseof the read voltages VA2, VA3, VA4, and VA5. Part (d) shows theserelationships.

The number of memory cell transistors MT having a threshold voltage withthe same magnitude as that of the read voltage VA2 is BCA2−BCA1=C1.Likewise, the number of memory cell transistors MT having a thresholdvoltage with the same magnitude as that of the read voltage VA3 isBCA3−BCA2=C2. The number of memory cell transistors MT having athreshold voltage with the same magnitude as that of the read voltageVA4 is BCA4−BCA3=C3. The number of memory cell transistors MT having athreshold voltage with the same magnitude as that of the read voltageVA5 is BCA5−BCA4=C4.

The memory controller 2 then detects the smallest one of the counts C1to C4 as a valley position (a local minimum position), and determines touse a threshold voltage corresponding to the valley position as theshifted boundary read voltage VAS.

The processing described with reference to FIG. 17 is performed on a setof the separation data DDs1 to DDs5, a set of the separation data FDs1to FDs5, and a set of the separation data KDs1 to KDs5. As a result, theshifted boundary read voltages VDS, VFS, and VKS can be determined inthe same manner of determining the shifted boundary read voltage VAS.

<1.2.2.2. When Selected Page is Middle Page>

FIG. 18 is a sub-flowchart for step S5 when a middle page is selectedaccording to the first embodiment. As shown in FIG. 18, the NO branch ofstep S4 goes to step S5201. A procedure for determining shifted boundaryread voltages when a middle page is selected is almost the same as theprocedure for determining the shifted boundary read voltages when thelower page is selected. Accordingly, differences from the processingshown in FIG. 10 will be mainly described below.

The memory controller 2 obtains the E read data ED, the H read data HD,and the K read data KD in steps S5201 to S5206. Steps S5201, S5202,S5203, and S5204 are respectively the same as steps S5103, S5104, S5105,and S5106 in FIG. 10. In step S5205, the memory controller 2 instructs Kread instead of E read in step S5201. In step S5206, the memorycontroller 2 executes K read and transmits the K read data KD instead ofexecuting E read and transmitting the E read data ED in step S5202.

The memory controller 2 performs shift read Z times in steps S5211 toS5215 as in steps S5111 to S5115 in FIG. 10. Shift amounts ΔVC, ΔVG,ΔVI, and ΔVM in each shift read are different from shift amounts ΔVC,ΔVG, ΔVI, and ΔVM in another shift read.

In step S5211, the memory controller 2 sets z to 1 as in step S5111 inFIG. 10.

Step S5212 is similar to step S5112 in FIG. 10. In step S5212, thememory controller 2 instructs middle page read (middle page shift read)MSRz using shift read voltages in the zth loop on the selected cell unitCU. In middle page shift read MSRz, the memory controller 2 specifiesshift amounts ΔVCz, ΔVGz, ΔVIz, and ΔVMz.

Step S5213 is similar to step S5113 in FIG. 10. In step S5213, thesemiconductor memory 1 performs middle page shift read MSRz on theselected cell unit CU with the shift amounts ΔVCz, ΔVGz, ΔVIz, and ΔVMz.That is, the semiconductor memory 1 performs middle page shift read withshift read voltages ΔVCz, ΔVGz, ΔVIz, and ΔVMz instead of the readvoltages VC, VG, VI, and VM. The shift read voltage VCz is VC+ΔVCz. Theshift read voltage VGz is VG+ΔVGz. The shift read voltage VIz isVI+ΔVIz. The shift read voltage VMz is VM+ΔVMz. The data obtained bymiddle page shift read MSRz is referred to as middle page shift readdata MSDz.

Steps S5214 and S5215 are the same as steps S5114 and S5115 in FIG. 10.When z≠Z (NO branch of step S5214), the memory controller 2 sets z=z+1in step S5215. The process then returns to step S5212. When z=Z (YESbranch of step S5214), the process goes to step S5221. When the processgoes to step S5221, the memory controller 2 should store middle pageshift read data MSD1, MSD2, MSD3, MSD4, and MSD5.

Step S5221 is similar to step S5121 in FIG. 10. In step S5221, thememory controller 2 masks particular bits of the middle page shift readdata MSD1 to MSD5 with the E read data ED, the H read data HD, and the Kread data KD as in step S5121. To this end, the memory controller 2performs logical operations using the E read data ED, the H read dataHD, the K read data KD, and the middle page shift read data MSD1 toMSD5. Performing the logical operations will produce separation data CDssuch as CDs1, CDs2, CDs3, CDs4, and CDs5, GDs such as GDs1, GDs2, GDs3,GDs4, and GDs5, IDs such as IDs1, IDs2, IDs3, IDs4, and IDs5, and MDssuch as MDs1, MDs2, MDs3, MDs4, and MDs5. Separation data CDsz, GDsz,IDsz, and MDsz each are formed from part of the middle page shift readdata MSDz. A method of obtaining the separation data CDs, GDs, IDs, andMDs will be described later. The memory controller 2 stores the obtainedseparation data CDs, GDs, IDs, and MDs in the RAM 23.

Step S5222 is similar to step S5122 in FIG. 10. In step S5222, thememory controller 2 calculates bit counts BCC1, BCC2, BCC3, BCC4, BCC5,BCG1, BCG2, BCG3, BCG4, BCG5, BCI1, BCI2, BCI3, BCI4, BCI5, BCM1, BCM2,BCM3, BCM4, and BCM5 with the separation data CDs, GDs, IDs, and MDs asin step S5122.

Step S5223 is similar to step S5123 in FIG. 10. In step S5223, thememory controller 2 determines shifted boundary read voltages VCS, VGS,VIS and VMS with the bit counts BCC1, BCC2, BCC3, BCC4, BCC5, BCG1,BCG2, BCG3, BCG4, BCG5, BCI1, BCI2, BCI3, BCI4, BCI5, BCM1, BCM2, BCM3,BCM4, and BCM5 as in step S5123.

The memory controller 2 then calculates shift amounts ΔVCS, ΔVGS, ΔVIS,and ΔVMS. The shift amount ΔVCS is VCS−VC. The shift amount ΔVGS isVGS−VG. The shift amount ΔVIS is VIS−VI. The shift amount ΔVMS isVMS−VM.

Step S5223 continues at step S6. When step S6 follows step S5223, thememory controller 2 specifies the shift amounts ΔVCS, ΔVGS, ΔVIS, andΔVMS in step S6.

The set of steps S5201 and S5202, the set of steps S5203 and S5204, andthe set of steps S5205 and S5206 can be performed in any orderdifferently from the order described with reference to FIG. 18.

The set of steps S5211, S5212, S5213, S5214, and S5215 may be performedbefore the set of steps S5201, S5202, S5203, S5204, S5205, and S5206. Inthis case, NO branch of step S4 continues at step S5211, YES branch ofstep S5214 continues at step S5201, and step S5206 continues at stepS5221.

<1.2.2.2.1. Shift Read>

FIG. 19 shows voltages applied to the selected word line WL along thetime in step S5213 according to the first embodiment.

As described with reference to FIG. 6, while the voltage is applied tothe selected word line WL, for example, the voltage VSG is applied tothe select gate line SGDL coupled to the selected string unit SU of theselected block BLK, and the voltage VREAD is applied to the unselectedword lines WL.

As shown in FIG. 19, voltage application for middle page shift read MSR1is performed in the period from time t211 to time t215, and voltageapplication for middle page shift read MSR2 is performed in thesubsequent period from time t221 to time t225. Subsequently, voltageapplication for middle page shift read MSR3 is performed in the periodfrom time t231 to time t235 (not shown), and voltage application formiddle page shift read MSR4 is performed in the period from time t241 totime t245 (not shown). Voltage application for middle page shift readMSR5 is then performed in the period from time t251 to time t255.

In the example in FIG. 19, in each of cases in which z=1, 2, and 3, theshift amounts ΔVCz, ΔVGz, ΔVI, and ΔVM have negative magnitudes.

Likewise, in each of cases in which γ is natural numbers from 1 to 5(inclusive), a read voltage VCγ is applied to the selected word line WLover the period from time t2γ1 to time t2γ2 to perform Cγ read. A readvoltage VGγ is applied to the selected word line WL over the period fromtime t2γ2 to time t2γ3 to perform Gγ read. A read voltage VIγ is appliedto the selected word line WL over the period from time t2γ3 to time t2γ4to perform Iγ read. A read voltage VMγ is applied to the selected wordline WL over the period from time t2γ4 to time t2γ5 to perform My read.

<1.2.2.2.2. Separation Data Calculation>

In step S5221, the memory controller 2 performs, for example, thefollowing logical operations in the RAM 23 to generate the separationdata CDs, GDs, IDs, and MDs.

The separation data CDs can be obtained by equation (5).CDsγ=MSD & ED  (5)

The memory controller 2 obtains separation data CDsγ by calculatingCDsγ=MSDγ & ED in each of cases in which γ is natural numbers from 1 to5. The separation data CDs1, CDs2, CDs3, CDs4, and CDs5 have differentnumbers of “1” data (and “0” data) bits.

The separation data GDs can be obtained by equation (6).GDs=(MSD & ⁻ ED) & HD  (6)

The memory controller 2 obtains separation data GDsγ by calculatingGDsγ=(MSDγ & ⁻ED) & HD in each of cases in which γ is natural numbersfrom 1 to 5. The separation data GDs1, GDs2, GDs3, GDs4, and GDs5 havedifferent numbers of “1” data (and “0” data) bits.

The separation data IDs can be obtained by equation (7).IDs=(MSD & ⁻ HD) & KD  (7)

The memory controller 2 obtains separation data IDsγ by calculatingIDsγ=(MSDγ & ⁻HD) &KD in each of cases in which γ is natural numbersfrom 1 to 5. The separation data IDs1, IDs2, IDs3, IDs4, and IDs5 havedifferent numbers of “1” data (and “0” data) bits.

The separation data MDs can be obtained by equation (8).MDs=MSD & ⁻ KD  (8)

The memory controller 2 obtains separation data MDsγ by calculatingMDsγ=MSDγ & ⁻KD in each of cases in which γ is natural numbers from 1 to5. The separation data MDs1, MDs2, MDs3, MDs4, and MDs5 have differentnumbers of “1” data (and “0” data) bits.

In each of cases in which δ is C, G, I, and M, the numbers of “1” data(or “0” data) bits read from memory cell transistors MT having thresholdvoltages between a read voltage Vδ1 and a read voltage Vδ5 increase inthe order of separation data δDs1, δDs2, δDs3, δDs4, and δDs5.Accordingly, the separation data δDs1 to δDs5 can be used to estimatethe numbers of memory cell transistors MT having threshold voltages withthe same magnitudes as those of read voltages Vδ2 to Vδ5 in the selectedcell unit CU.

<1.2.2.2.3. Identification of Bit Counts and Shifted Boundary ReadVoltages>

The memory controller 2 performs the processing described with referenceto FIG. 17 on a set of the separation data CDs' to CDs5, a set of theseparation data GDs1 to GDs5, a set of the separation data IDs1 to IDs5,and a set of the separation data MDs1 to MDs5. As a result, the shiftedboundary read voltages VCS, VGS, VIS, and VMS can be determined in thesame manner as determining the shifted boundary read voltage VAS.

<1.2.2.3. When Selected Page is Upper Page>

FIG. 20 is a sub-flowchart for step S5 when an upper page is selectedaccording to the first embodiment. As shown in FIG. 20, the NO branch ofstep S4 goes to step S5301. A procedure for determining shifted boundaryread voltages when an upper page is selected is almost the same as theprocedure for determining the shifted boundary read voltages when thelower page is selected. Accordingly, differences from the processingshown in FIG. 10 will be mainly described below.

The memory controller 2 obtains the E read data ED and the K read dataKD in steps S5301 to S5304. Steps S5301 and S5302 are respectively thesame as steps S5103 and S5104 in FIG. 10. In step S5303, the memorycontroller 2 instructs K read instead of E read in step S5301. In stepS5304, the memory controller 2 executes K read and transmits the K readdata KD instead of executing E read and transmitting the E read data EDin step S5302.

The memory controller 2 performs shift read Z times in steps S5311 toS5315 as in steps S5111 to S5115 in FIG. 10. Shift amounts ΔVB, ΔVH, andΔVN in each shift read are different from shift amounts ΔVB, ΔVH, andΔVN in another shift read.

In step S5311, the memory controller 2 sets z to 1 as in step S5111 inFIG. 10.

Step S5312 is similar to step S5112 in FIG. 10. In step S5312, thememory controller 2 instructs upper page read (upper page shift read)USRz using shift read voltages in the zth loop on the selected cell unitCU. In upper page shift read USRz, the memory controller 2 specifiesshift amounts ΔVBz, ΔVHz, and ΔVNz.

Step S5313 is similar to step S5113 in FIG. 10. In step S5313, thesemiconductor memory 1 performs upper page shift read USRz on theselected cell unit CU with the shift amounts ΔVBz, ΔVHz, and ΔVNz. Thatis, the semiconductor memory 1 performs upper page shift read with shiftread voltages VBz, VHz, and VNz instead of the read voltages VB, VH, andVN. The shift read voltage VBz is VB+ΔVBz. The shift read voltage VHz isVH+ΔVHz. The shift read voltage VNz is VN+ΔVNz. The data obtained byupper page shift read USRz is referred to as upper page shift read dataUSDz.

Steps S5314 and S5315 are the same as steps S5114 and S5115 in FIG. 10.When z≠Z (NO branch of step S5314), the memory controller 2 sets z=z+1in step S5315. The process then returns to step S5312. When z=Z (YESbranch of step S5314), the process goes to step S5321. When the processgoes to step S5321, the memory controller 2 should store upper pageshift read data USD1, USD2, USD3, USD4, and USD5.

Step S5321 is similar to step S5121 in FIG. 10. In step S5321, thememory controller 2 masks particular bits of the upper page shift readdata USD1 to USD5 with the E read data. ED, and the K read data KD as instep S5121. To this end, the memory controller 2 performs logicaloperations using the E read data ED, the K read data. KD, and the upperpage shift read data USD1 to USD5. Performing the logical operationswill produce separation data BDs such as BDs1, BDs2, BDs3, BDs4, andBDs5, HDs such as HDs1, HDs2, HDs3, HDs4, and HDs5, and NDs such asNDs1, NDs2, NDs3, NDs4, and NDs5. Separation data BDsz, HDsz, and NDszeach are formed from part of the upper page shift read data USDz. Amethod of obtaining the separation data BDs, HDs, and NDs will bedescribed later. The memory controller 2 stores the obtained separationdata BDs, HDs, and NDs in the RAM 23.

Step S5322 is similar to step S5122 in FIG. 10. In step S5322, thememory controller 2 calculates bit counts BCB1, BCB2, BCB3, BCB4, BCB5,BCH1, BCH2, BCH3, BCH4, BCH5, BCN1, BCN2, BCN3, BCN4, and BCN5 with theseparation data BDs, HDs, and NDs as in step S5122.

Step S5323 is similar to step S5123 in FIG. 10. In step S5323, thememory controller 2 determines shifted boundary read voltages VBS, VHS,and VNS with the bit counts BCB1, BCB2, BCB3, BCB4, BCB5, BCH1, BCH2,BCH3, BCH4, BCH5, BCN1, BCN2, BCN3, BCN4, and BCN5 as in step S5123.

The memory controller 2 then calculates shift amounts ΔVBS, ΔVHS, andΔVNS. The shift amount ΔVBS is VBS−VB. The shift amount ΔVHS is VHS−VH.The shift amount ΔVMS is VNS−VN.

Step S5323 continues as step S6. When step S6 follows step S5323, thememory controller 2 specifies the shift amounts ΔVBS, ΔVHS, and ΔVNS instep S6.

The set of steps S5301 and S5302 and the set of steps S5303 and S5304can be performed in any order differently from the order described withreference to FIG. 20.

The set of steps S5311, S5312, S5313, S5314, and S5315 may be performedbefore the set of steps S5301, S5302, S5303, and S5304. In this case, NObranch of step S4 continues at step S5311, YES branch of step S5314continues at step S5301, and step S5304 continues at step S5321.

<1.2.2.3.1. Shift Read>

FIG. 21 shows voltages applied to the selected word line WL along thetime in step S5313 according to the first embodiment.

As described with reference to FIG. 6, while the voltage is applied tothe selected word line WL, for example, the voltage VSG is applied tothe select gate line SGDL coupled to the selected string unit SU of theselected block BLK, and the voltage VREAD is applied to the unselectedword lines WL.

As shown in FIG. 21, voltage application for upper page shift read USR1is performed in the period from time t311 to time t314, and voltageapplication for upper page shift read USR2 is performed in thesubsequent period from time t321 to time t324. Subsequently, voltageapplication for upper page shift read USR3 is performed in the periodfrom time t331 to time t334 (not shown), and voltage application forupper page shift read USR4 is performed in the period from time t341 totime t344 (not shown). Voltage application for upper page shift readUSR5 is then performed in the period from time t351 to time t354.

In the example in FIG. 11, in each of cases in which z=1, 2, and 3, theshift amounts ΔVBz, ΔVHz, and ΔVN have negative magnitudes.

Likewise, in each of cases in which γ is natural numbers from 1 to 5(inclusive), a read voltage VBγ is applied to the selected word line WLover the period from time t3γ1 to time t3γ2 to perform By read. A readvoltage VHγ is applied to the selected word line WL over the period fromtime t3γ2 to time t3γ3 to perform Hγ read. A read voltage VNγ is appliedto the selected word line WL over the period from time t3γ3 to time t3γ4to perform Nγ read.

<1.2.2.3.2. Separation Data Calculation>

In step S5321, the memory controller 2 performs, for example, thefollowing logical operations in the RAM 23 to generate the separationdata BDs, HDs, and NDs.

The separation data BDs can be obtained by equation (9).BDs=USD & ED  (9)

The memory controller 2 obtains separation data BDsγ by calculatingBDsγ=USDγ & ED in each of cases in which γ is natural numbers from 1 to5. The separation data BDs1, BDs2, BDs3, BDs4, and BDs5 have differentnumbers of “1” data (and “0” data) bits.

The separation data HDs can be obtained by equation (10).HDs=(USD & ⁻ ED) & KD  (10)

The memory controller 2 obtains separation data HDsγ by calculatingHDsγ=(USDγ & ⁻ED) & KD in each of cases in which γ is natural numbersfrom 1 to 5. The separation data HDs1, HDs2, HDs3, HDs4, and HDs5 havedifferent numbers of “1” data bits.

The separation data NDs can be obtained by equation (11).NDs=USD & ⁻ KD  (11)

The memory controller 2 obtains separation data NDsγ by calculatingNDsγ=USDγ & ⁻KD in each of cases in which γ is natural numbers from 1 to5. The separation data BDs1, BDs2, BDs3, BDs4, and BDs5 have differentnumbers of “1” data (and “0” data) bits.

In each of cases in which δ is B, H, and N, the numbers of “1” data (or“0” data) bits read from memory cell transistors MT having thresholdvoltages between a read voltage Vδ1 and a read voltage Vδ5 increase inthe order of separation data δDs1, δDs2, δDs3, δDs4, and δDs5.Accordingly, the separation data δDs1 to δDs5 can be used to estimatethe numbers of memory cell transistors MT having threshold voltages withthe same magnitudes as those of read voltages Vδ2 to Vδ5 in the selectedcell unit CU.

<1.2.2.3.3. Identification of Bit Counts and Shifted Boundary ReadVoltages>

The memory controller 2 performs the processing described with referenceto FIG. 17 on a set of the separation data BDs1 to BDs5, a set of theseparation data HDs1 to HDs5, and a set of the separation data MDs1 toMDs5. As a result, the shifted boundary read voltages VBS, VHS, and VNScan be determined in the same manner as determining the shifted boundaryread voltage VAS.

<1.2.2.4. When Selected Page is Top Page>

FIG. 22 is a sub-flowchart for step S5 when a top page is selectedaccording to the first embodiment. As shown in FIG. 22, if the NO branchof step S4 goes to step S5401. A procedure for determining shiftedboundary read voltages when a top page is selected is almost the same asthe procedure for determining the shifted boundary read voltages whenthe lower page is selected. Accordingly, differences from the processingshown in FIG. 10 will be mainly described below.

The memory controller 2 obtains the H read data HD, the K read data KD,and the N read data ND in steps S5401 to S5406. Steps S5401 and S5402are respectively the same as steps S5105 and S5106 in FIG. 10. In stepS5403, the memory controller 2 instructs K read instead of H read instep S5401. In step S5404, the memory controller 2 executes K read andtransmits the K read data KD instead of executing H read andtransmitting the H read data HD in step S5402. In step S5405, the memorycontroller 2 instructs N read instead of H read in step S5401. In stepS5406, the memory controller 2 executes N read and transmits the N readdata ND instead of executing H read and transmitting the H read data HDin step S5402.

The memory controller 2 performs shift read Z times in steps S5411 toS5415 as in steps S5111 to S5115 in FIG. 10. Shift amounts ΔVE, ΔVJ,ΔVL, and ΔVO in each shift read are different from shift amounts ΔVE,ΔVJ, ΔVL, and ΔVO in another shift read.

In step S5411, the memory controller 2 sets z to 1 as in step S5111 inFIG. 10.

Step S5412 is similar to step S5112 in FIG. 10. In step S5412, thememory controller 2 instructs top page read (top page shift read) TSRzusing shift read voltages in the zth loop on the selected cell unit CU.In top page shift read TSRz, the memory controller 2 specifies shiftamounts ΔVEz, ΔVJz, ΔVLz, and ΔVOz.

Step S5413 is similar to step S5113 in. FIG. 10. In step S5413, thesemiconductor memory 1 performs top page shift read TSRz on the selectedcell unit CU with the shift amounts ΔVEz, ΔVJz, ΔVLz, and ΔVOz. That is,the semiconductor memory 1 performs top page shift read with shift readvoltages VEz, VJz, VLz, and VOz instead of the read voltages VE, VJ, VL,and VO. The shift read voltage VEz is VE+ΔVEz. The shift read voltageVJz is VJ+ΔVJz. The shift read voltage VLz is VL+ΔVLz. The shift readvoltage VOz is VO+ΔVOz. The data obtained by top page shift read TSRz isreferred to as top page shift read data TSDz.

Steps S5414 and S5415 are the same as steps S5114 and S5115 in FIG. 10.When z≠Z (NO branch of step S5414), the memory controller 2 sets z=z+1in step S5415. The process then returns to step S5412. When z=Z (YESbranch of step S5414), the process goes to step S5421. When the processgoes to step S5421, the memory controller 2 should store top page shiftread data TSD1, TSD2, TSD3, TSD4, and TSD5.

Step S5421 is similar to step S5121 in FIG. 10. In step S5421, thememory controller 2 masks particular bits of the top page shift readdata TSD1 to TSD5 with the H read data HD, the K read data KD, and the Nread data ND as in step S5121. To this end, the memory controller 2performs logical operations using the H read data HD, the K read dataKD, the N read data ND and the top page shift read data TSD1 to TSD5.Performing these logical operations will produce separation data EDssuch as EDs1, EDs2, EDs3, EDs4, and EDs5, JDs such as JDs1, JDs2, JDs3,JDs4, and JDs5, LDs such as LDs1, LDs2, LDs3, LDs4, and LDs5, and ODssuch as ODs1, ODs2, ODs3, ODs4, and ODs5. Separation data EDsz, JDsz,LDsz, and ODsz each are formed from part of the top page shift read dataTSDz. A method of obtaining the separation data EDs, JDs, LDs, and ODswill be described later. The memory controller 2 stores the obtainedseparation data EDs, JDs, LDs, and ODs in the RAM 23.

Step S5422 is similar to step S5122 in FIG. 10. In step S5422, thememory controller 2 calculates bit counts BCE1, BCE2, BCE3, BCE4, BCE5,BCJ1, BCJ2, BCJ3, BCJ4, BCJ5, BCL1, BCL2, BCL3, BCL4, BCL5, BCO1, BCO2,BCO3, BCO4, and BCO5 with the separation data EDs, JDs, LDs, and ODs asin step S5122.

Step S5423 is similar to step S5123 in FIG. 10. In step S5423, thememory controller 2 determines shifted boundary read voltages VES, VJS,VLS, and VOS with the bit counts BCE1, BCE2, BCE3, BCE4, BCE5, BCJ1,BCJ2, BCJ3, BCJ4, BCJ5, BCL1, BCL2, BCL3, BCL4, BCL5, BCO1, BCO2, BCO3,BCO4, and BCO5 as in step S5123.

The memory controller 2 then calculates shift amounts ΔVES, ΔVJS, ΔVLSand ΔVOS. The shift amount ΔVES is VES−VE. The shift amount ΔVJS isVJS−VJ. The shift amount ΔVLS is VLS−VL. The shift amount ΔVOS isVOS−VO.

Step S5423 continues at step S6. When step S6 follows step S5423, thememory controller 2 specifies the shift amounts ΔVES, ΔVJS, ΔVLS, andΔVOS in step S6.

The set of steps S5401 and S5402, the set of steps S5403 and S5404, andthe set of steps S5405 and S5406 can be performed in any orderdifferently from the order described with reference to FIG. 22.

The set of steps S5411, S5412, S5413, S5414, and S5415 may be performedbefore the set of steps S5401, S5402, S5403, S5404, S5405, and S5406. Inthis case, NO branch of step S4 continues at step S5411, YES branch ofstep S5414 continues at step S5401, and step S5406 continues at S5421.

<1.2.2.4.1. Shift Read>

FIG. 23 shows voltages applied to the selected word line WL along thetime in step S5413 according to the first embodiment.

As described with reference to FIG. 6, while the voltage is applied tothe selected word line WL, for example, the voltage VSG is applied tothe select gate line SGDL coupled to the selected string unit SU of theselected block BLK, and the voltage VREAD is applied to the unselectedword lines WL.

As shown in FIG. 23, voltage application for top page shift read TSR1 isperformed in the period from time t411 to time t415, and voltageapplication for top page shift read TSR2 is performed in the subsequentperiod from time t421 to time t425. Subsequently, voltage applicationfor top page shift read TSR3 is performed in the period from time t431to time t435 (not shown), and voltage application for top page shiftread TSR4 is performed in the period from time t441 to time t445 (notshown). Voltage application for top page shift read TSR5 is thenperformed in the period from time t451 to time t455.

In the example in FIG. 23, in each of cases in which z=1, 2, and 3, theshift amounts ΔVEz, ΔVJz, ΔVL, and ΔVO have negative magnitudes.

Likewise, in each of cases in which γ is natural numbers from 1 to 5(inclusive), a read voltage VEγ is applied to the selected word line WLover the period from time t4γ1 to time t4γ2 to perform Eγ read. A readvoltage VJγ is applied to the selected word line WL over the period fromtime t4γ2 to time t4γ3 to perform Jγ read. A read voltage VLγ is appliedto the selected word line WL over the period from time t4γ3 to time t4γ4to perform Lγ read. A read voltage VOγ is applied to the selected wordline WL over the period from time t4γ4 to time t4γ5 to perform Oγ read.

<1.2.2.4.2. Separation Data Calculation>

In step S5421, the memory controller 2 performs, for example, thefollowing logical operations in the RAM 23 to generate the separationdata. EDs, JDs, LDs, and ODs.

The separation data EDs can be obtained by equation (12).EDs=TSD & HD  (12)

The memory controller 2 obtains separation data EDsγ by calculatingEDsγ=TSDγ & HD in each of cases in which γ is natural numbers from 1 to5. The separation data EDs1, EDs2, EDs3, EDs4, and EDs5 have differentnumbers of “1” data (and “0” data) bits.

The separation data JDs can be obtained by equation (13).JDs=(TSD & ⁻ HD) & KD  (13)

The memory controller 2 obtains separation data JDsγ by calculatingJDsγ=(TSDγ & ⁻HD) & KD in each of cases in which γ is natural numbersfrom 1 to 5. The separation data JDs1, JDs2, JDs3, JDs4, and JDs5 havedifferent-numbers of “1” data (and “0” data) bits.

The separation data LDs can be obtained by equation (14).LDs=(TSD & ⁻ KD) & ND  (14)

The memory controller 2 obtains separation data LDsγ by calculatingLDsγ=(TSD & ⁻KD) & ND in each of cases in which γ is natural numbersfrom 1 to 5. The separation data LDs1, LDs2, LDs3, LDs4, and LDs5 havedifferent numbers of “1” data (and “0” data) bits.

The separation data ODs can be obtained by equation (15).ODs=TSD & ⁻ ND  (15)

The memory controller 2 obtains separation data ODsγ by calculatingODsγ=TSDγ & ND in each of cases in which γ is natural numbers from 1 to5. The separation data ODs1, ODs2, ODs3, ODs4, and ODs5 have differentnumbers of “1” data (and “0” data) bits.

In each of cases in which δ is E, J, L, and O, the numbers of “1” data(or “0” data) bits read from memory cell transistors MT having thresholdvoltages between a read voltage Vδ1 and a read voltage Vδ5 increase inthe order of separation data δDs1, δDs2, δDs3, δDs4, and δDs5.Accordingly, the separation data δDs1 to δDs5 can be used to estimatethe numbers of memory cell transistors MT having threshold voltages withthe same magnitudes as those of read voltages Vδ2 to Vδ5 in the selectedcell unit CU.

<1.2.2.4.3. Identification of Bit Counts and Shifted Boundary ReadVoltages>

The memory controller 2 performs the processing described with referenceto FIG. 17 on a set of the separation data EDs1 to EDs5, a set of theseparation data JDs1 to JDs5, a set of the separation data LDs1 to LDs5,and a set of the separation data ODs1 to ODs5. As a result, the shiftedboundary read voltages VES, VJS, and VLS, and VOS can be determined inthe same manner as determining the shifted boundary read voltage VAS.

<1.3. Advantages (Effects)>

According to the first embodiment, necessary shifted boundary readvoltages VCGRS can be determined in a short period of time, as will bedescribed below.

For comparison, when errorless data is not obtained from data read froma selected page, the shifted boundary read voltage VCGRS can bedetermined in the following manner. That is, a plurality of shiftedboundary read voltages VCGRS required for the selected page aredetermined by individual tracking. For example, when a lower page is aread target with four-bit allocation in a state like that shown in FIG.3, estimating the shifted boundary read voltage VAS requires performingsingle state read Z (for example, five) times using a plurality of readvoltages VCGR having different magnitudes near the read voltage VA. Thedata obtained by such single state reads are transmitted from thesemiconductor memory to the memory controller. The memory controllerdetermines the shifted boundary read voltage VAS from the received data.It is necessary to perform such Z single state reads, the transmissionof the single state read data from the semiconductor memory to thememory controller, and the determination of the shifted boundary readvoltage VCGRS, in order to determine the remaining shifted boundary readvoltages VDS, VFS, and VKS. It is, therefore, necessary to transferpage-size data from the semiconductor memory to the memory controller 4(=20) times. This requires a long time.

The same applies to other pages. In each of the cases of a middle pageand a top page, data transfer needs to be performed 4 Z (=20) times. Inthe case of an upper page, data transfer needs to be performed 3 Z (=15)times.

When other pages are read targets or bit allocation differs from thatshown in FIG. 3, the necessary number of times of data transfer canvary. Based on any bit allocation, even if the number of times of datatransfer in a first page is small, the number of times of data transferis accordingly large in a second page. That is, in the method accordingto the comparative example, the average of the numbers of times of datatransfer required for read from pages is large.

According to the first embodiment, shift read is performed a pluralityof times with all the boundary read voltages VCGR in a selected pageshifted, shift read data is masked based on the results obtained bysingle state read performed several times to obtain separation data, andthe shifted boundary read voltages VCGRS are determined from theseparation data. Accordingly, the number of times 1-page size data istransmitted from the semiconductor memory 1 to the memory controller 2for the estimation of the shifted boundary read voltages VCGRS issmaller than that in the case described above for comparison. Themaximum number of times of transmission of page-size data occurs in thecases of a lower page, a middle page, and a top page, and it is total of3+Z (=8), including three times of transmission of single state readdata and Z times of transmission of lower page shift read data.Therefore, the shifted boundary read voltages VCGRS can be determinedbased on the number of times of transmission of page-size data which issmaller than that in the method according to the comparative example.This makes it possible to determine the shifted boundary read voltagesVCGRS in a shorter time than in the method according to the comparativeexample.

<1.4. Modification>

Equations (1) to (15) each are merely an example of a logical operation.Any logical operation can be used as long as separation data having theabove characteristics can be obtained.

Second Embodiment

The second embodiment is similar to the first embodiment and concerns anexample in which shifted boundary read voltages VCGRS like those in thefirst embodiment are determined for all four pages of a selected cellunit CU together.

<2.1. Structure (Configuration)>

A memory system 5 according to the second embodiment has the samecomponents and connections as those in the memory system 5 according tothe first embodiment. A memory controller 2 according to the secondembodiment is configured to perform the operation described below. Morespecifically, firmware in the ROM 24 is configured to cause the memorycontroller 2 to perform the operation described below.

<2.2. Operation>

FIG. 24 shows a flowchart for an operation of the memory systemaccording to the second embodiment. FIG. 24, in particular, shows aflowchart for the estimation of all shifted boundary read voltages VCGRSfor all the four pages in one selected cell unit CU. The flowchart shownin FIG. 24 can be performed when, for example, read from all the pagesin the selected cell unit CU is to be performed, but errorless datafails to be obtained by read from one page in the selected cell unit CU.That is, the flowchart shown in FIG. 24 can be performed as asub-flowchart for step S5 when, for example, read from the four pages inthe selected cell unit CU based on FIG. 5 of the first embodiment isplanned to be performed.

As shown in FIGS. 24 and 25, the memory controller 2 obtains B read dataBD, E read data ED, H read data HD, N read data ND, and K read data KDin steps S11 to S20. Steps S11, S12, S13, S14, S15, and S16 arerespectively the same as steps S5101, S5102, S5103, S5104, S5105, andS5106 in FIG. 10. In step S17, the memory controller 2 instructs K readinstead of B read in step S11. In step S18, the memory controller 2executes K read and transmits the K read data KD instead of executing Bread and transmitting the B read data BD in step S12. In step S19, thememory controller 2 instructs N read instead of B read in step S11. Instep S20, the memory controller 2 executes N read and transmits the Nread data ND instead of executing B read and transmitting the B readdata BD in step S12.

The memory controller 2 performs shift read Z times on all the selectedpages in steps S21 to S28 as in steps S5111 to S5115 in FIG. 10. Thememory controller 2 can perform shift read on selected pages in anyorder. An example of this operation will be described below.

In step S21, the memory controller 2 sets a parameter t to 1. Theparameter t specifies a page as a shift read target. For example, thememory controller 2 performs shift read on a lower page, a middle page,an upper page, and a top page when t is 1, 2, 3, and 4, respectively.

Steps S22, S23, and S24 are respectively similar to steps S5111, S5112,and S5113 in FIG. 10. The flowchart differs from that in FIG. 10 in thatthe memory controller 2 specifies a shift amount ΔVXz for boundary readdepending on which page is selected in step S23 and the semiconductormemory 1 executes shift read with on a selected page in step S24.Operations in step S23 while a lower page, a middle page, an upper page,and a top page are selected are respectively the same as those in stepS5112 in FIG. 10, step S5212 in FIG. 18, step S5312 in FIG. 20, and stepS5412 in FIG. 22. Operations in step S24 while a lower page, a middlepage, an upper page, and a top page are selected are respectively thesame as those in step S5113 in FIG. 10, step S5213 in FIG. 18, stepS5313 in FIG. 20, and step S5413 in FIG. 22.

Steps S26 and S27 are respectively the same as steps S5114 and S5115 inFIG. 10. When z≠Z, the memory controller 2 sets z=z+1 in step S27. Theprocess then returns to step S23. When z=Z, the process goes to stepS28.

In step S28, the memory controller 2 determines whether t is a maximumvalue T. T is 4. When t≠T (NO branch of step S28), the memory controller2 sets t=t+1 in step S29. The process then goes to step S22. When t=T(YES branch of step S28), the process goes to step S31. When the processgoes to step S31, the memory controller 2 should store lower page shiftread data LSDγ, middle page shift read data MSDγ, upper page shift readdata USDγ, and top page shift read data TSDγ in cases in which γ isnatural numbers from 1 to 5.

Step S31 is similar to step S5121 in FIG. 10. In step S31, the memorycontroller 2 performs step S5121 in FIG. 10, step S5221 in FIG. 18, stepS5321 in FIG. 20, and step S5421 in FIG. 22. As a result, separationdata ADsγ, BDsγ, CDsγ, DDsγ, EDsγ, FDsγ, GDsγ, HDsγ, IDsγ, JDsγ, KDsγ,LDsγ, MDsγ, NDsγ, and ODsγ are obtained in each of cases in which γ isnatural numbers from 1 to 5. The memory controller 2 can calculate theseparation data ADsγ, BDsγ, CDsγ, DDsγ, EDsγ, FDsγ, GDsγ, HDsγ, IDsγ,JDsγ, KDsγ, LDsγ, MDsγ, NDsγ, and ODsγ in any order.

Step S32 is similar to step S5122 in FIG. 10. In step S32, the memorycontroller 2 performs step S5122 in FIG. 10, step S5222 in FIG. 18, stepS5322 in FIG. 20, and step S5422 in FIG. 22. As a result, bit countsBCAγ, BCBγ, BCCγ, BCDγ, BCEγ, BCFγ, BCGγ, BCHγ, BCIγ, BCJγ, BCKγ, BCLγ,and BCOγ are obtained in each of the cases in which γ is natural numbersfrom 1 to 5.

Step S33 is similar to step S5123 in FIG. 10. In step S33, the memorycontroller 2 performs step S5123 in FIG. 10, step S5223 in FIG. 18, stepS5323 in FIG. 20, and step S5423 in FIG. 22. As a result, shiftedboundary read voltages VAS, VBS, VCS, VDS, VES, VFS, VGS, VHS, VIS, VJS,VKS, VLS, VMS, VNS, and VOS are determined.

Subsequently, the memory controller 2 can perform lower page shift readwhile specifying the shifted boundary read voltages VAS, VDS, VFS, andVKS specified, middle page shift read while specifying the shiftedboundary read voltages VCS, VGS, VIS, and VMS, upper page shift readwhile specifying the shifted boundary read voltages VBS, VHS, and VNS,and top page shift read while specifying the shifted boundary readvoltages VES, VJS, VLS, and VOS.

According to the second embodiment, as in the first embodiment, thememory controller 2 performs shift read a plurality of times with allthe boundary read voltages VCGR for the selected string unit SU shifted,masks shift read data based on the result of single state read performedseveral times to obtain separation data, and determines the shiftedboundary read voltages VCGRS from the separation data. Accordingly, thesame advantages as those of the first embodiment can be obtained.

Third Embodiment

The third embodiment is similar to the second embodiment but differsfrom the second embodiment in a method of obtaining shift read data fromall the four pages of a selected cell unit CU.

<3.1. Structure (Configuration)>

A memory system 5 according to the third embodiment has the samecomponents and connections as those in the memory system 5 according tothe first embodiment. A memory controller 2 according to the thirdembodiment is configured to perform the operation described below.

<3.2. Operation>

FIG. 26 shows a flowchart for an operation of the memory systemaccording to the third embodiment. FIG. 26, in particular, shows aflowchart for the estimation of all shifted boundary read voltages VCGRSfor all the four pages in one selected cell unit CU. As in the secondembodiment, the flowchart shown in FIG. 26 can be performed when, forexample, read from all the pages in the selected cell unit CU is to beperformed, but errorless data fails to be obtained by read from one pagein the selected cell unit CU.

The flowchart in FIG. 26 includes steps S22, S41, S42, S43, and S44instead of steps S21, S22, S23, S24, S25, S26, S27, S28, and S29 in theflowchart in FIG. 25 according to the second embodiment.

In step S41, the memory controller 2 instructs sequential read (shiftsequential read) SSRz using shift read voltages in the zth loop on aselected cell unit CU. The memory controller 2 specifies shift amountsΔVAz, ΔVBz, ΔVCz, ΔVDz, ΔVEz, ΔVFz, ΔVGz, ΔVHz, ΔVIz, ΔVJz, ΔVKz, ΔVLz,ΔVMz, ΔVNz, and ΔVOz in shift sequential read SSRz.

In step S42, a semiconductor memory 1 performs shift sequential readSSRz on the selected cell unit CU with the shift amounts ΔVAz, ΔVBz,ΔVCz, ΔVDz, ΔVEz, ΔVFz, ΔVGz, ΔVHz, ΔVIz, ΔVJz, ΔVKz, ΔVLz, ΔVMz, ΔVNz,and ΔVOz. Shift sequential read SSRz will be described later. As aresult of the shift sequential read SSRz, lower page shift read dataLSDz, middle page shift read data MSDz, upper page shift read data USDz,and top page shift read data TSDz are obtained.

Steps S43 and S44 are respectively the same as steps S5114 and S5115 inFIG. 10. When z≠Z (NO branch of step S43), the memory controller 2 setsz=z+1 in step S44. The process then returns to step S41. When z=Z (YESbranch of step S43), the process goes to step S31.

FIG. 27 shows voltages applied to the selected word line WL along thetime in an operation of the semiconductor memory 1 according to thethird embodiment. FIG. 27 shows voltages in step S42 in FIG. 26 in thefirst loop, that is, during shift sequential read SSR1.

As shown in FIG. 27, the semiconductor memory 1 applies read voltagesVA1, VB1, VC1, VD1, VE1, VF1, VG1, VH1, VI1, VJ1, VK1, VL1, VM1, VN1,and VO1 to the selected word line WL in the period from time t1 to timet2 in this order. While applying the read voltages VA1, VB1, VC1, VD1,VE1, VF1, VG1, VH1, VI1, VJ1, VK1, VL1, VM1, VN1, and VO1, thesemiconductor memory 1 respectively performs A1 read, B1 read, C1 read,D1 read, E1 read, F1 read, G1 read, H1 read, I1 read, J1 read, K1 read,L1 read, M1 read, N1 read, and O1 read. As a result, A1 read data, B1read data, C1 read data, D1 read data, E1 read data, F1 read data, G1read data, H1 read data, I1 read data, J1 read data, K1 read data, L1read data, M1 read data, N1 read data, and O1 read data are obtained.

Subsequently, the semiconductor memory 1 obtains lower page shift readdata LSD1, middle page shift read data MSD1, upper page shift read dataUSD1, and top page shift read data TSD1 by logical operations of the A1read data, the B1 read data, the C1 read data, the D1 read data, the E1read data, the F1 read data, the G1 read data, the H1 read data, the I1read data, the J1 read data, the K1 read data, the L1 read data, the M1read data, the N1 read data, and the O1 read data. The same applies toshift sequential reads SSR1 to SSR5. In shift sequential read SSRz,shift read voltages VAz, VBz, VCz, VDz, VEz, VFz, VGz, VHz, VIz, VJz,VKz, VLz, VMz, VNz, and VOz are applied in this order.

According to the third embodiment, as in the first embodiment, shiftread data is masked based on the result of single state read performedseveral times to obtain separation data, and shifted boundary readvoltages are estimated from the separation data. Accordingly, the thirdembodiment produces the same advantages as those of the firstembodiment.

According to the third embodiment, all shifted boundary read voltagesVCGRS for four pages in one cell unit CU are estimated by shiftsequential read. Accordingly, all the shifted boundary read voltagesVCGRS for four pages in a cell unit CU can be estimated in a shortertime than in the first embodiment.

Fourth Embodiment

The fourth embodiment differs from the first embodiment in the method ofgenerating separation data and the method of determining shiftedboundary read voltages VCGRS. More specifically, the fourth embodimentdiffers from the first embodiment in the sub-flowchart for step S5 inFIG. 5.

<4.1. Structure (Configuration)>

A memory system 5 according to the fourth embodiment has the samecomponents and connections as those in the memory system 5 according tothe first embodiment. A memory controller 2 according to the fourthembodiment is configured to perform the operation described below.

<4.2. Operation>

The memory controller 2 generates each write data of page size throughrandomization of data. Randomization means generating data so as toequalize the occurrence frequencies of the values of bits in page-sizedata and the biased arrangement of the respective values. As a result,the number of “1” data is almost equal to the number of “0” data in thepage-size data, and the bits of the “1” data are almost uniformlydistributed so are the bits of the “0” data.

Writing such randomized data in a semiconductor memory 1 can equalizethe number of “1” data bits to the number of “0” data bits in all thefour bits stored in each selected memory cell transistor MT anduniformize the numbers of “1” data bits and the numbers of “0” data bitsthroughout all selected memory cell transistors MT. That is, the numbersof memory cell transistors MT in Er state to O state in each cell unitCU in which data are written are almost equal. The number of memory celltransistors MT in any state of Er state to O state in each cell unit CUwith data written is p/16. Note that p is the number of memory celltransistors MT in one cell unit CU.

<4.2.1. Read Voltage Estimation>

Flowcharts for step S5 differ depending on which one of a lower page, amiddle page, an upper page, and a top page is selected. A case in whicha selected page is a lower page will be described first with referenceto FIG. 28.

<4.2.1.1. When Selected Page is Lower Page>

<4.2.1.1.1. Read Voltage Estimation>

FIG. 28 shows a flowchart for an operation of the memory systemaccording to the fourth embodiment. This flowchart is a sub-flowchartfor step S5 in FIG. 5. As shown in FIG. 28, the YES branch of step S5114continues at step S51.

In step S51, as in step S5121 in FIG. 10 according to the firstembodiment, the memory controller 2 masks particular bits of lower pageshift read data LSD1 to LSD5 with B read data BD, E read data ED, and Hread data HD. To this end, the memory controller 2 performs logicaloperations using B read data BD, E read data ED, H read data HD, andlower page shift read data LSD1 to LSD5. Performing the logicaloperations will produce separation data ADr such as ADr1, ADr2, ADr3,ADr4, and ADr5, DDr such as DDr1, DDr2, DDr3, DDr4, and DDr5, FDr suchas FDr1, FDr2, FDr3, FDr4, and FDr5, and KDr such as KDr1, KDr2, KDr3,KDr4, and KDr5. The logical operations differ from those in the firstembodiment and will be described later.

In step S52, the memory controller 2 calculates bit counts OCA such asOCA1, OCA2, OCAS, OCA4, and OCA5, OCD such as OCD1, OCD2, OCD3, OCD4,and OCD5, OCF such as OCF1, OCF2, OCF3, OCF4, and OCF5, and OCK such asOCK1, OCK2, OCK3, OCK4, and OCK5 with the separation data ADr, DDr, FDr,and KDr. OCA1, OCA2, OCA3, OCA4, OCA5, OCD1, OCD2, OCD3, OCD4, OCD5,OCF1, OCF2, OCF3, OCF4, OCF5, OCK1, OCK2, OCK3, OCK4, and OCK5respectively represent the numbers of “1” data bits in the separationdata ADr1, ADr2, ADr3, ADr4, ADr5, DDr1, DDr2, DDr3, DDr4, DDr5, FDr1,FDr2, FDr3, FDr4, FDr5, KDr1, KDr2, KDr3, KDr4, and KDr5.

In step S53, the memory controller 2 detects a candidate of the valley(local minimum) position corresponding to the voltage that can beselected as a shifted boundary read voltage VAS using the “1” data bitcounts OCA1, OCA2, OCA3, OCA4, and OCAS. Likewise, the memory controller2 detects a candidate of the valley position corresponding to thevoltage that can be selected for a shifted boundary read voltage VDSusing the “1” data bit counts OCD1, OCD2, OCD3, OCD4, and OCD5. Thememory controller 2 detects a candidate of the valley positioncorresponding to the voltage that can be selected for a shifted boundaryread voltage VFS using the “1” data bit counts OCF1, OCF2, OCF3, OCF4,and OCF5. The memory controller 2 detects a candidate of the valleyposition corresponding to the voltage that can be selected for a shiftedboundary read voltage VKS by using the “1” data bit counts OCK1, OCK2,OCK3, OCK4, and OCK5.

In step S54, the memory controller 2 selects a valley position to beused from the valley position candidates detected for the shiftedboundary read voltage VAS. A method of selecting a valley position willbe described later. A read voltage VCGR corresponding to the selectedvalley position is used as the shifted boundary read voltage VAS.Likewise, the memory controller 2 selects a valley position to be usedfrom the valley position candidates detected for the shifted boundaryread voltage VDS, and determines the shifted boundary read voltage VDS.The memory controller 2 selects a valley position to be used from thevalley position candidates detected for the shifted boundary readvoltage VFS, and determines the shifted boundary read voltage VFS. Thememory controller 2 selects a valley position to be used from the valleyposition candidates detected for the shifted boundary read voltage VKS,and determines the shifted boundary read voltage VKS.

<4.2.1.1.2. Separation Data Calculation>

The separation data ADs can be obtained by equation (16).ADr=LSD & BD  (16)

The memory controller 2 obtains separation data ADrγ by calculatingADrγ=LSDγ & BD in each of cases in which γ is natural numbers from 1 to5. The separation data ADrγ has “1” data in a bit of a selected memorycell transistor MT having a threshold voltage lower than a read voltageVAγ and has “0” data in a bit of a selected memory cell transistor MThaving a threshold voltage equal to or higher than the read voltage VAγ.The separation data DDr can be obtained by equation (17).DDrγ=(⁻ LSD|BD) & ED  (17)

The operator “|” indicates an OR operation on two operands on bothsides.

The memory controller 2 obtains separation data DDrγ by calculatingDDrγ=(⁻LSDγ|BD) & ED in each of cases in which γ is natural numbers from1 to 5.

FIG. 29 shows an example of data obtained by step S51 according to thefourth embodiment. FIG. 29 shows an example of the separation data DDr.As shown in FIG. 29, the separation data DDrγ has “1” data in a bit of aselected memory cell transistor MT having a threshold voltage lower thana read voltage VDγ and has “0” data in a bit of a selected memory celltransistor MT having a threshold voltage equal to or higher than theread voltage VDγ.

The separation data FDr can be obtained by equation (18).FDrγ=(LSD|ED) & HD  (18)

The memory controller 2 obtains separation data FDrγ by calculatingFDrγ=(LSDγ|ED) & HD in each of cases in which γ is natural numbers from1 to 5.

The separation data KDr can be obtained by equation (19).KDr= ⁻ LSD|HD  (19)

The memory controller 2 obtains separation data KDrγ by calculatingKDrγ=⁻LSDγ|HD in each of cases in which γ is natural numbers from 1 to5.

With regard to all combinations of cases in which γ is natural numbersfrom 1 to 5 and cases in which δ are F and K, like the separation dataADr and DDr, separation data δDrγ has “1” data in a bit of a selectedmemory cell transistor MT having a threshold voltage lower than a readvoltage Vδγ and has “0” data in a bit of a selected memory celltransistor MT having a threshold voltage equal to or higher than theread voltage VDγ.

<4.2.1.2. When Selected Page is Page Other than Lower Page>

<4.2.1.2.1. Read Voltage Estimation>

A flowchart for a middle page, upper page, or top page selected is thesame as that described with reference to FIG. 28. These flowchartsdiffer in single state read executed in steps S5101 to S5106, shift readexecuted in steps S5112 and S5113, and calculation of separation data instep S51. In addition, in steps S53 and S54, the memory controller 2detects valley position candidates and selects a valley position for theshifted boundary read voltages VCGRS corresponding to a selected page.

When a middle page is selected, the memory controller 2 obtains E readdata ED, H read data HD, and K read data KD by performing E read, Hread, and K read instead of B read, E read, and H read in steps S5101 toS5106. The memory controller 2 performs middle page shift read usingshift read voltages VCz, VGz, VIz, and VMz instead of lower page shiftread using shift read voltages VAz, VDz, VFz, and VKz in steps S5112 andS5113.

When an upper page is selected, the memory controller 2 obtains E readdata ED and K read data KD by performing E read and K read instead of Bread, E read, and H read in steps S5101 to S5106. The memory controller2 performs upper page shift read using shift read voltages VBz, VHz, andVNMz instead of lower page shift read using shift read voltages VAz,VDz, VFz, and VKz in steps S5112 and S5113.

When a top page is selected, the memory controller 2 obtains H read dataHD, K read data KD, and N read data ND by performing H read, K read, andN read instead of B read, E read, and H read in steps S5101 to S5106.The memory controller 2 performs top page shift read using shift readvoltages VEz, VJz, VLz, and VOz instead of lower page shift read usingshift read voltages VAz, VDz, VFz, and VKz in steps S5112 and S5113.

<4.2.1.1.2. Separation Data Calculation>

Separation data when a page other than a lower page is selected can becalculated by a method described below. Descriptions in chapter<4.2.1.1.2. Separation Data Calculation> apply to points other thanthose described below.

Separation data CDr, GDr, IDr, and MDr when a middle page is selectedcan be calculated by the following equations.

The separation data CDr can be obtained by equation (20).CDr=MSD & ED  (20)

The separation data GDr can be obtained by equation (21).GDr=(⁻ MSD|ED) & HD  (21)

The separation data IDr can be obtained by equation (22).IDr=(MSD|HD) & KD  (22)

The separation data MDr can be obtained by equation (23).MDr= ⁻ MSD|KD  (23)

The memory controller 2 obtains separation data CDr1, CDr2, CDr3, CDr4,CDr5, GDr1, GDr2, GDr3, GDr4, GDr5, IDr1, IDr2, IDr3, IDr4, IDr5, MDr1,MDr2, MDr3, MDr4, and MDr5 in the same manner as in the case of a lowerpage.

Separation data BDr, HDr, and NDr when an upper page is selected can becalculated by the following equations.

The separation data BDr can be obtained by equation (24).BDr=USD & ED  (24)

The separation data HDr can be obtained by equation (25).HDr=(⁻ USD|ED) & KD  (25)

The separation data NDr can be obtained by equation (26).NDr=USD|KD  (26)

The memory controller 2 obtains separation data BDr1, BDr2, BDr3, BDr4,BDr5, HDr1, HDr2, HDr3, HDr4, HDr5, NDr1, NDr2, NDr3, NDr4, and NDr5 inthe same manner as in the case of a lower page.

Separation data EDr, JDr, LDr, and ODr when a top page is selected canbe calculated by the following equations.

The separation data EDr can be obtained by equation (27).EDr=TSD & HD  (27)

The separation data JDr can be obtained by equation (28).JDr=(⁻ TSD|HD) & KD  (28)

The separation data LDr can be obtained by equation (29).LDr=(TSD|KD) & ND  (29)

The separation data ODr can be obtained by equation (30).ODr= ⁻ TSD|ND  (30)

The memory controller 2 obtains separation data EDr1, EDr2, EDr3, EDr4,EDr5, JDr1, JDr2, JDr3, JDr4, JDr5, LDr1, LDr2, LDr3, LDr4, LDr5, ODr1,ODr2, ODr3, ODr4, and ODr5 in the same manner as in the case of a lowerpage.

With regard to all combinations of cases in which γ is natural numbersfrom 1 to 5 and cases in which δ are B, C, E, G, H, I, J, L, M, N, andO, separation data δDrγ has “1” data in a bit of a selected memory celltransistor MT having a threshold voltage lower than a read voltage Vδγand has “0” data in a bit of a selected memory cell transistor MT havinga threshold voltage equal to or higher than the read voltage VDγ.

<4.2.1.3. Valley Position Candidate Detection>

FIG. 30 shows a flowchart for an operation of the memory systemaccording to the fourth embodiment. This flowchart is a sub-flowchartfor step S53 in FIG. 28. FIG. 30 shows an example in which shift read isperformed ten times for the estimation of one shifted boundary readvoltage VCGRS (for example, a shifted boundary read voltage VAS), i.e.,an example in which Z=10. The following description and FIG. 30 concerna boundary read voltage VX that is estimated in a manner that can applyto not only a case for the estimation of the shifted boundary readvoltage VAS but also a case for the estimation of another shiftedboundary read voltage VXS.

FIG. 31 shows differences between the adjacent twos of “1” data bitcounts OCX1 to OCX10 of ten separation data XDr1 to XDr10 based on theten shift read data obtained for the estimation of one boundary readvoltage VX, i.e., OCXw (where w is a natural number between 2 and 10(inclusive))−OCX(w−1), according to the fourth embodiment.

As shown in FIG. 30, in step S101, the memory controller 2 sets aparameter i (where i is a natural number) to 1. In step S102, the memorycontroller 2 sets a parameter Slope_(i) to “DOWN”. As a more specificexample, Slope_(i) has one bit, and the value “DOWN” is “0” data.

In step S103, the memory controller 2 determines whether i=Z. Zrepresents the number of times of shift read to be executed. That is, Zis 10 in this case. When i=Z (YES branch of step S103), the processingis terminated. When i≠Z, the process goes to step S104. In step S104,the memory controller 2 sets i=i+1.

In step S111, the memory controller 2 determines whether i is lower thanZ. When i is lower than Z (YES ranch of step S111), the process goes tostep S112.

In step S112, the memory controller 2 obtains OC_diff_(i),OC_diff_(i−1), and Slope__(i−1). OC_diff_(i) is the value obtained bysubtracting “1” data bit count OCXi in separation data XDr_(i) from “1”data bit count OCX(i+1) in separation data XDr_(i+1).

In step S113, the memory controller 2 determines whether OC_diff_(i−1)exceeds OC_diff_(i). When OC_diff_(i−1) exceeds OC_diff_(i) (YES branchof step S113), it indicates that the amount of change from the “1” databit count at the read voltage VX(i−1) to the “1” data bit count at theread voltage VXi is larger than the amount of change from the “1” databit count at the read voltage VXi to the “1” data bit count at the readvoltage VX(i+1), and the amount of change in “1” data bit countdecreases from that at the read voltage VXi to that at the read voltageVX(i+1). Accordingly, in step S114, the memory controller 2 setsSlope_(i) to “DOWN”.

When OC_diff_(i−1) does not exceed OC_diff_(i) (NO branch of step S113),it indicates that the amount of change from the “1” data bit count atthe read voltage VX(i−1) to the “1” data bit count at the read voltageVXi is equal to or lower than the amount of change from the “1” data bitcount at the read voltage VXi to the “1” data bit count at the readvoltage VX(i+1), and the amount of change in “1” data bit countincreases from that at the read voltage VXi to that at the read voltageVX(i+1). Accordingly, in step S115, the memory controller 2 setsSlope_(i) to “UP”. Step S121 follows steps S114 and S115.

When i≥Z (NO branch of step S111) in step S111, the process goes to stepS131. In step S131, the memory controller 2 obtains Slope_(i−1). StepS131 continues at step S115, and Slope_(i) is set to “UP”. That is, wheni=10, the memory controller 2 sets Slope_(i) to “UP” regardless of themagnitudes of OC_diff_(i−1) and OC_diff_(i).

In step S121, the memory controller 2 determines whetherSlope_(i−1)=“DOWN” and Slope_(i)=“UP”. When they hold (YES ranch of stepS121), it indicates that OC_diff_(i−1) is smaller than bothOC_diff_(i−2) and OC_diff_(i). Accordingly, OC_diff_(i−1) can bedetermine as a candidate of a valley position in the threshold voltagedistribution of the memory cell transistors MT. Based on this, in stepS122, the memory controller 2 selects OC_diff_(i−1) as a valley positioncandidate. Step S122 continues at step S103.

When i=10, because Slope_(i) is unconditionally set to “UP” in stepS115, the memory controller 2 determines OC_diff₉ as a valley positioncandidate as long as Slope₉ is “DOWN”. Likewise, when i=1, becauseSlope₁ is unconditionally set to “DOWN” in step S102, the memorycontroller 2 determines OC_diff_(i) as a valley position candidate aslong as Slope₂ is “UP”.

When the conditions in step S121 do not hold, the memory controller 2determines in step S123 that OC_diff_(i−1) is not a valley position.Step S123 continues at step S103.

In this manner, the memory controller 2 determines whether OC_diff_(i)is a valley position candidate in each of cases in which i ranges from 1to Z−1 (=9), and selects one or more valley candidate positions. In theexample shown in FIG. 31, OC_diff₃, OC_diff₇, and OC_diff₉ enclosed bythe dotted lines are selected as valley position candidates.

<4.2.1.4. Valley Position Decision>

FIG. 32 shows a concept of a method of determining a valley position instep S54 according to the fourth embodiment. FIG. 32 shows therelationships between the threshold voltages of the memory celltransistors MT in a cell unit CU and the numbers of memory celltransistors MT, and the data read from the respective memory celltransistors MT by several reads. FIG. 32 shows only several states. Part(a) indicates a state immediately after write. Part (b) indicates astate a time lapse after the write.

As indicated by part (a) in FIG. 32, the boundary (valley) between thedistribution for C state and the distribution for D state almostcoincides with the default read voltage VD. For this reason, when datais read from the cell unit CU in the state indicated by part (a) with heread voltage VD, the read data DD has “1” data in all the bits in thememory cell transistors MT having threshold voltages lower than the readvoltage VD. That is, the memory cell transistors MT in Er, A, B, or Cstate output “1” data. The read voltage VD has the fourth smallestmagnitude among the (state count (=16)−1) read voltages VA, VB, VC, VD,VE, VF, VG, VH, VI, VJ, VK, VL, VM, VN, and VO required for data read.Accordingly, the number of “1” data bits is about p×4/16.

As indicated by part (b) in FIG. 32, assume that all the distributioncurves of threshold voltages move in the negative direction. In order toestimate the shifted boundary read voltage VDS at the boundary between Dstate and E state, shift read is performed with a plurality of readvoltages VCGR in a search window extending from the read voltage VD inboth the positive and negative directions. As indicated by part (b),depending on the displacement of the threshold voltage distributions,two read voltages VDv and VEv corresponding to valley positions aredetected as valley position candidates in the search range. However, theread voltage VEv is not located at the boundary between D state and Estate and hence cannot be the shifted boundary read voltage VDS.

The separation data DDr obtained by read with the read voltage VDv hasabout p×4/16 “1” data bits, as described above. In contrast, theseparation data EDr obtained by read with the read voltage VEv has aboutp×5/16 “1” data bits. Using such difference, the memory controller 2determines one valley position from several position candidates. Thedetails are as follows.

First of all, the memory controller 2 obtains “1” data bit counts in theseparation data respectively corresponding to valley positioncandidates. Based on the example shown in FIG. 31, valley positioncandidates are OC_diff₃, OC_diff₇, and OC_diff₉. The memory controller 2obtains the “1” data bit counts OCX4, OCX8, and OCX10 respectivelycorresponding to OC_diff₃, OC_diff₇, and OC_diff₉. The “1” data bitcount OCX4 corresponds to the number of “1” data bits in the separationdata XDr for the read data obtained with the read voltage VX4. The sameapplies to the “1” data bit counts OCX8 and OCX10. The memory controller2 then selects one of the “1” data bit counts OCX4, OCX8, and OCX10which is nearest to p×Y/16. Y has a value determined based on X, and is1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, or 15 when X is A, B, C,D, E, F, G, H, I, J, K, L, M, N, or O. The memory controller 2determines OC_diff corresponding to one “1” data bit count OCX selectedin this manner as a valley position. Referring to FIG. 31, the memorycontroller 2 determines, for example, OC_diff₃ as a valley position, anddetermines to use the corresponding read voltage VX4.

<4.3. Advantages (Effects)>

According to the fourth embodiment, as in the first embodiment, shiftread is performed a plurality of times with all the boundary readvoltages VCGR for a selected page shifted, shift read data is maskedbased on the result of single state read performed several times toobtain separation data, and shifted boundary read voltages VCGRS areestimated from the separation data. Accordingly, the fourth embodimentproduces the same advantages as those of the first embodiment.

According to the fourth embodiment, a plurality of valley positioncandidates are detected for the estimation of each shifted boundary readvoltage VCGRS, and one shifted boundary read voltage VCGRS is selectedfrom the valley position candidates based on the “1” data bit countsdetermined based on the shifted boundary read voltages VCGRS. Thisimproves the accuracy of selection of a valley position and inhibitserroneous selection of another shifted boundary read voltage VCGRS. Itis, therefore, possible to estimate a more reliable shifted boundaryread voltage VCGRS.

<4.4. Modification>

Equations (16) to (30) each are merely an example of a logicaloperation. Any logical operation can be used as long as separation datahaving the above characteristics can be obtained.

The fourth embodiment is applicable to the second embodiment or thethird embodiment. In this case, steps S51, S52, S53, and S54 in FIG. 28according to the fourth embodiment are performed instead of a set ofsteps S31, S32, and S33 in FIG. 25 according to the second embodiment orin FIG. 26 according to the third embodiment. In step S51, the memorycontroller 2 uses equations (16) to (30) to obtain separation data ADr,BDr, CDr, DDr, EDr, FDr, GDr, HDr, IDr, JDr, KDr, LDr, MDr, NDr, or ODr.In steps S52 and S53, the memory controller 2 detects valley positioncandidates based on the “1” data bit count for each of all the shiftedboundary read voltages VCGRS using the separation data ADr, BDr, CDr,DDr, EDr, FDr, GDr, HDr, IDr, JDr, KDr, LDr, MDr, NDr, or ODr. In stepS54, the memory controller 2 selects one valley position from the valleyposition candidates for each of all the boundary read voltages VCGR, anddecides the corresponding shifted boundary read voltage VCGRS.

The separation data XDr may be obtained by a method different from thelogical operation between shift read data and single state read for apage as in step S5121. That is, in order to estimate one boundary readvoltage VX, shift read is performed a plurality of times using shiftread voltage VXz with different magnitudes for different parameters z.Using the shift read data obtained by each shift read as the separationdata XDr can estimate the shift read voltages VCGRS, as described withreference to FIGS. 30, 31, and 32.

Fifth Embodiment

The fifth embodiment can be additionally applied to any one of the firstto fourth embodiments.

A memory system 5 according to the fifth embodiment has the samecomponents and connections as those of the memory system 5 according tothe first embodiment. In contrast, a memory controller 2 according tothe fifth embodiment is configured to perform the following operations.

The characteristics of memory cell transistors MT inevitably differ fromeach other. For this reason, according to the fifth embodiment, memorycell transistors MT are classified into a plurality of groups such thatmemory cell transistors MT having similar characteristics constitute onegroup.

For example, the memory cell transistors MT are classified according toword lines WL to which they are coupled. That is, the word lines WL aredivided into a plurality of groups WLG. Each word line group WLG isconstituted by a plurality of word lines WL having consecutiveaddresses. For example, word lines WL0 to WLa (where a is a naturalnumber) belong to a word line group WLG0. Word lines WL(a+1) to WLb(where b is a natural number larger than a+1) belong to a word linegroup WLG1. Word lines WL(b+1) to WLc (where c is a natural numberlarger than b+1) belong to a word line group WLG2. Word lines WL(c+1) toWLd (where d is a natural number larger than c+1) belong to a word linegroup WLG3. The word lines WL may be classified into four or less orfive or more groups.

Cell units CU respectively coupled to word lines WL included in eachword line group WLG are assumed to have similar characteristics, and inparticular, have similar data retention characteristics. In contrast tothis, the cell units CU respectively coupled to word lines WL includedin a different word line group WLG are assumed to have differentcharacteristics (data retention characteristics in particular).

<5.1. Basic Operation>

The memory controller 2 uses different values for one or more parametersused in step S5 for different word line groups WLG. An example is asfollows.

The memory controller 2 can use different search ranges for differentword line groups WLG. That is, the memory controller 2 uses differentsets of values of ΔVXz for different word line groups WLG. FIG. 33indicates such an example, and shows distributions of threshold voltagesfor two adjacent states according to the fifth embodiment.

FIG. 33 shows distribution of threshold voltages for cell units CUcoupled to a word line WLf (where f is a natural number) belonging to aparticular word line group WLG and distribution of threshold voltagesfor cell units CU coupled to a word line WLg (where g is a naturalnumber other than f) belonging to another word line group WLG. As shownin FIG. 33, the overall distribution for the word lines WLg is locatedat a lower position in terms of threshold voltages than the overalldistribution for the word lines WLf.

Based on such positional difference between distributions, shift read isperformed with read voltages VCGR in a range SRf for the word line WLf,and shift read is performed with read voltages VCGR in a range SRg forthe word line WLg. The range SRf extends over a width W1 centered on adefault read voltage VE. The range SRg extends over the width W1centered on a read voltage VEg lower than the default read voltage VE.

The position of a search range to be applied can be determined inadvance by, for example, a simulation or experiment, and information onthe search range position can be stored in a ROM 24 of the memorycontroller 2. The memory controller 2 can store the information on thesearch range position in a RAM 23 during an operation and refer to theinformation when performing read. The memory controller 2 determinesΔVXz in shift read in step S5 and notifies the semiconductor memory 1 ofdetermined ΔVXz while referring to search range position information.

Such adjustment for search range for each word line group WLG isapplicable to one or more boundary read voltages.

<5.2. Applied Operation>

The following applied operation can be additionally performed inaddition to the basic operation.

The memory controller 2 performs different single state reads for thedifferent word line groups WLG. FIG. 34 is a flowchart for such anexemplary operation, showing a case in which the fifth embodiment isapplied, as a representative embodiment, to the estimation of shiftedboundary read voltages VCGRS for a lower page of the first embodiment,i.e., the flowchart in FIG. 10. In order to execute the flowchart inFIG. 34, the memory controller 2 stores set of data associated with eachother in the form shown in FIG. 35

As shown in FIG. 35, ΔVBg, ΔVEg, and ΔVHg are prepared for each wordline group WLG. That is, ΔVBg0, ΔVEg0, and ΔVHg0 are prepared for theword line group WLG0. ΔVBg0, ΔVEg0, and ΔVHg0 may be equal to ordifferent from each other. Likewise, ΔVBg1, ΔVEg1, and ΔVHg1, which maybe equal to or different from each other, are prepared for the word linegroup WLG1. ΔVBg2, ΔVEg2, and ΔVHg2, which may be equal to or differentfrom each other, are prepared for the word line group WLG2. ΔVBg3,ΔVEg3, and ΔVHg3, which may be equal to or different from each other,are prepared for the word line group WLG3.

As shown in FIG. 34, step S4 continues at step S61. In step S61, thememory controller 2 instructs the semiconductor memory 1 to use ΔVBgdetermined based on the address of the selected cell unit CU. Morespecifically, the memory controller 2 instructs one of ΔVBg0, ΔVBg1,ΔVBg2, and ΔVBg3 for the word line group WLG to which the selected wordlines WL belong.

In step S62, the memory controller 2 instructs the semiconductor memory1 to use ΔVEg determined based on the selected word line WL as in stepS61.

In step S63, the memory controller 2 instructs the semiconductor memory1 to use ΔVHg determined based on the selected word line WL as in stepS61. Step S63 continues at step S5101.

Steps S61, S62, and S63 may be performed in an order different from thatin the flowchart in FIG. 34. In addition, only one command may be usedto perform instruction in the set of steps S61 to S63.

After step S5101, the semiconductor memory 1 uses the sum (=VB+ΔVBg) ofthe read voltage VB and a specified adjustment instead of the readvoltage VB, uses the sum (=VE+ΔVEg) of the read voltage VE and aspecified adjustment instead of the read voltage VE, and uses the sum(=VH+ΔVHg) of the read voltage VH and a specified adjustment instead ofthe read voltage VH.

Different single state reads for different word line groups WLG for theestimation of boundary read voltages in each of a middle page, an upperpage, and a top page are the same as those described with reference toFIG. 35. That is, the read voltages VCGR for one or more single statereads required to calculate separation data required for the estimationof the shifted boundary read voltages VCGRS are specified for eachselected page in steps like steps S61 to S63. In the case of a middlepage, ΔVEg, ΔVHg, and ΔVKg are specified. Subsequently, VE+ΔVEg,VH+ΔVHg, and VK+ΔVKg are used instead of the read voltages VE, VH, andVK. In the case of an upper page, ΔVEg and ΔVKg are specified, andVE+ΔVEg and VK+ΔVKg are then used instead of the read voltages VE andVK. In the case of a top page, ΔVHg, ΔVKg, and ΔVNg are specified, andVH+ΔVHg, VK+ΔVKg, and VN+ΔVNg are then used instead of the read voltagesVH, VK, and VN.

A case in which different sets of single state reads for different wordline groups WLG for the estimation of the shifted boundary read voltagesVCGRS are applied to the fourth embodiment is the same as a case inwhich they are applied to the first embodiment.

In a case in which different sets of single state reads for differentword line groups WLG for the estimation of boundary read voltages areapplied to the second or third embodiment, ΔVBg, ΔVEg, ΔVHg, ΔVKg, andΔVNg are specified before steps S11 to S20 in FIG. 24 or 26. Thereafter,VB+ΔVBg, VE+ΔVEg, VH+ΔVHg, VK+ΔVKg, and VN+ΔVNg are used instead of theread voltages VB, VE, VH, VK, and VN.

According to the basic operation of the fifth embodiment, in addition tothe advantages obtained through one or more of the first to fourthembodiments applied, the following advantages can be obtained. That is,using different search ranges for the different word line groups WLGallows for estimation of the read voltages VCGR from ranges more matchedwith inevitable characteristic variations of the memory cell transistorsMT. This makes it possible to more accurately detect valleys betweenthreshold distributions of the memory cell transistors MT.

Additionally performing the applied operation will produce the followingadvantages.

FIG. 36 shows the relationships between the threshold voltages of thememory cell transistors MT in a cell unit. CU and the numbers of memorycell transistors MT immediately after write and after a lapse of time,and search ranges. Assume that the overall threshold voltagedistribution curves have moved in the negative direction with a lapse oftime, as indicated by the lower part in FIG. 36. Consider the cases ofrespectively generating the separation data FDr immediately after writeand a time after the write.

In a state immediately after write, the read voltage VF and the defaultsearch range SR1 are used. In this case, the search range SR1 issufficiently separated from the read voltage VE for masking. For thisreason, in any of the separation data FDr obtained with shift readvoltages VCGR in the search range SR1, bit information useful for thedetection of a valley position is not masked by the E read data ED. Thatis, the search range SR1 is not narrowed.

In contrast, when a search range SR2 moved from the search range SR1 tothe negative side due to lapse of time after write is used, part of thesearch range SR2 can overlap the read voltage VE. In such case, in theseparation data FDr obtained with the shift read voltages VCGR equal toor lower than the read voltage VE in the search range SR2, bitinformation useful for the detection of a valley position can be maskedby the E read data ED and lost. Such separation data FDr is not usefulfor the detection of a valley position. That is, the search range SR2 isnarrower than the search range SR1.

According to the fifth embodiment, single read data used for valleyposition detection is obtained using the read voltage VCGR differentfrom, in particular lower than the default read voltage VCGR. Forexample, like FIG. 36, FIG. 37 shows the relationships between thethreshold voltages of the memory cell transistors MT in a cell unit CUand the numbers of memory cell transistors MT immediately after writeand after a lapse of time, and search ranges. According to the exampleshown in FIG. 37, E read is performed with a read voltage VE+ΔVEg. Thisinhibits the search range SR1 from overlapping the read voltage VE+ΔVEgfor single state read even when the search range SR1 for the estimationof the boundary read voltage VCGR between E state and F state isadjusted. This inhibits the loss of bits useful for valley positionsearch in several separation data FDr obtained via several read voltagesVCGR in the search range SR1. That is, the size of the search range SR1is maintained. This makes it possible to estimate a valley position withhigher accuracy than when a search range is narrowed as shown in FIG.36.

While certain embodiments have been described, these embodiments havebeen presented by way of example only, and are not intended to limit thescope of the inventions. Indeed, the novel embodiments described hereinmay be embodied in a variety of other forms; furthermore, variousomissions, substitutions and changes in the form of the embodimentsdescribed herein may be made without departing from the spirit of theinventions. The accompanying claims and their equivalents are intendedto cover such forms or modifications as would fall within the scope andspirit of the inventions.

What is claimed is:
 1. A memory system comprising: a semiconductormemory including memory cells and a word line coupled to the memorycells; and a controller configured to: write four-bit data in each ofthe memory cells, read first data item from the memory cells throughapplication of a first voltage to the word line, read a plurality ofsecond data items by repeating a first operation of reading dataincluding data of respective first bits of the memory cells throughapplication of two voltages to the word line at different timings whilechanging the two voltages in each first operation from the two voltagesin another first operation, and mask part of each of the second dataitems using the first data item.
 2. The system of claim 1, wherein: thefirst voltage has a magnitude between one of the two voltages and theother of the two voltages.
 3. The system of claim 1, wherein: the firstdata item is obtained by determining in which one of two states each ofthe memory cells is, based on the first voltage, and one of the seconddata items is obtained by determining in which one of sixteen stateseach of the memory cells is.
 4. The system of claim 3, wherein the firstdata item includes a plurality of first bits, each of the first bits isbased on in which one of two states one of the memory cells is, based onthe first voltage, each of the memory cells stores data in a first digitbit, a second digit bit, a third digit bit, and a fourth digit bit, eachof the second data items includes a plurality of second bits, and eachof the second bits of one of the second data items includes a datastored in the first digit bit of one of the memory cells.
 5. The systemof claim 1, wherein: the controller is configured to mask one of thesecond data items by performing a logical operation on the one of thesecond data items and the first data item.
 6. The system of claim 1,wherein: the controller is configured to change one of the two voltageswithin a first range and change the other of the two voltages within asecond range every time the first operation is repeated.
 7. The systemof claim 6, wherein: the controller is further configured to: obtain aplurality of third data items through the masking with the first dataitem, determine a plurality of first counts of memory cells estimated tohave threshold voltages respectively corresponding to a plurality ofvoltages within the first range based on the third data items, anddetect, from the first counts, one or two or more second counts that arelocal minimum within the first range.
 8. The system of claim 7, wherein:the controller is further configured to: select, when the two or moresecond counts are detected, a third count from the two or more secondcounts that are nearest to a number of the memory cells×Y/16 (where Y isa natural number not larger than 16), and use a voltage corresponding tothe third count to determine whether a threshold voltage of one of thememory cells is higher than a Y^(th) lowest boundary voltage of fifteenboundary voltages.
 9. The system of claim 8, wherein: the controller isfurther configured to select the first range based on the word line. 10.The system of claim 9, wherein: the controller is further configured toselect the first voltage based on the first range.
 11. A memory systemcomprising: a semiconductor memory including memory cells and a wordline coupled to the memory cells; and a controller configured to: writep-bit (where p is a natural number not lower smaller than 2) data ineach of the memory cells, read a plurality of first data items byrepeating a first operation of reading data including data in the memorycells through application of a first voltage to the word line atdifferent timings while changing the first voltage in each firstoperation from the first voltage in another first operation, determine aplurality of first counts of memory cells estimated to have thresholdvoltages respectively corresponding to a plurality of voltages within afirst range based on the first data items, detect, from the firstcounts, one or two or more second counts that are local minimum withinthe first range, select, when the two or more second counts aredetected, a third count from the two or more second counts that arenearest to a number of the memory cells×Y/2^(p) (where Y is a naturalnumber not more than 2^(p)), and use a voltage corresponding to thethird count to determine whether a threshold voltage of one of thememory cells is higher than a Y^(th) lowest boundary voltage of 2^(p)−1boundary voltages.
 12. The system of claim 11, wherein: the controlleris configured to change the first voltage within the first range everytime the first operation is repeated.
 13. The system of claim 11,wherein: each of the first data items includes a plurality of firstbits, and each of the first bits is based on in which one of two statesone of the memory cells is, based on the first voltage.